Example #1
0
 def test_has_anonymous_display_name_both_names_set(self):
     user = UserProfile(username='******', display_name='Bob Bobbertson')
     assert not user.has_anonymous_display_name()
Example #2
0
 def test_has_anonymous_display_name_username_set(self):
     user = UserProfile(username='******', display_name=None)
     assert not user.has_anonymous_display_name()
Example #3
0
 def test_has_anonymous_display_name_display_name_set(self):
     user = UserProfile(display_name='Bob Bobbertson')
     user.anonymize_username()
     assert not user.has_anonymous_display_name()
Example #4
0
 def test_has_anonymous_display_name_no_names(self):
     user = UserProfile(display_name=None)
     user.anonymize_username()
     assert user.has_anonymous_display_name()
 def test_has_anonymous_display_name_no_names(self):
     user = UserProfile(display_name=None)
     user.anonymize_username()
     assert user.has_anonymous_display_name()
 def test_has_anonymous_display_name_both_names_set(self):
     user = UserProfile(username='******', display_name='Bob Bobbertson')
     assert not user.has_anonymous_display_name()
 def test_has_anonymous_display_name_display_name_set(self):
     user = UserProfile(display_name='Bob Bobbertson')
     user.anonymize_username()
     assert not user.has_anonymous_display_name()
 def test_has_anonymous_display_name_username_set(self):
     user = UserProfile(username='******', display_name=None)
     assert not user.has_anonymous_display_name()