Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify required fields #31

Merged
merged 4 commits into from
Jan 20, 2017
Merged

Simplify required fields #31

merged 4 commits into from
Jan 20, 2017

Conversation

alanmoo
Copy link
Contributor

@alanmoo alanmoo commented Jan 17, 2017

Closes #22

How are migrations handled when a server is already live? Do I need to just makemigration starting from a database that's identical to the one that's on the server and then commit the migration files?

@alanmoo alanmoo requested a review from Pomax January 17, 2017 23:22
Pomax
Pomax previously requested changes Jan 19, 2017
content_url = models.URLField()
thumbnail_url = models.URLField()
description = models.CharField(max_length=300, blank=True)
content_url = models.URLField(blank=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure about this one? Are people supposed to be able to post entries without a URL to point to the thing the entry was supposed to be for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I goofed. Fixed now.

@alanmoo alanmoo dismissed Pomax’s stale review January 19, 2017 20:02

I want to see what happens when I dismiss a review

Pomax
Pomax previously requested changes Jan 19, 2017
@@ -19,7 +19,7 @@ def test_post_minimum_entry(self):
"""
Test posting an entry with minimum amount of content
"""
payload = self.generatePostPayload(data={'title':'title test_post_minimum_entry'})
payload = self.generatePostPayload(data={'title':'title test_post_minimum_entry', 'tags':''})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably also want to make sure we have full test coverage for required fields now.

def test_post_empty_title(self):
tests for title, but with content_url also being required, we want to make sure that's a 400 as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@alanmoo alanmoo dismissed Pomax’s stale review January 19, 2017 20:51

Updated test to check for content_url

Pomax
Pomax previously requested changes Jan 19, 2017
@@ -36,23 +36,18 @@ def test_post_duplicate_title(self):
self.assertEqual(len(entriesJson), 4)

def test_post_empty_title(self):
"""Make sure entries require a title"""
"""Make sure entries require a title and content_url"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we split this up into two tests?

@alanmoo alanmoo dismissed Pomax’s stale review January 19, 2017 23:39

Made requested changes

@alanmoo alanmoo merged commit 5f89af5 into master Jan 20, 2017
@alanmoo alanmoo deleted the optionalize-entry-fields branch January 20, 2017 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants