-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
c81e519
to
868b876
Compare
@whit537 is this good? Let me know what you think. |
@@ -3,14 +3,14 @@ | |||
from postgres.orm import Model | |||
|
|||
|
|||
name_pattern = re.compile(r'^[A-Za-z0-9,._ -]+$') | |||
name_pattern = re.compile(r"^[A-Za-z0-9,._ '-]+$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should modify the semantics of the code we have in production. I think instead we should modify fake data to not use community names that don't pass name_pattern
.
I made a boo boo again by pushing a large number of commits that have nothing to do with this PR or even the branch that I am working on. |
fake data instead as suggested
aaf7a5f
to
65274e9
Compare
Ready for review again @whit537 |
@@ -3,7 +3,6 @@ | |||
from gratipay.utils import fake_data | |||
from gratipay.testing import Harness | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this line back. No reason to remove it on this PR.
""" | ||
crusher = self.make_participant('crusher', email_address='[email protected]') | ||
team = fake_data.fake_team( self.db, crusher, "D'Amorebury") | ||
assert team.name != "d-amorebury" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm ... is this the best assertion here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it isn't but the alternative I can't really see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if the test is called test_fake_team_does_not_fail_for_teams_with_apostrophes
then the assertion is sufficient. :)
Pass done. Todo in the description! |
@kaguillera Reviewed latest commits, updated Todo. ;) |
This should fix the issue #3722
Todo