コード例 #1
0
 def test_invalid_name(self):
     """validate_username_available disallows unvailable names"""
     with self.assertRaises(ValidationError):
         validate_username_available(self.test_user.username)
コード例 #2
0
 def test_invalid_name(self):
     """validate_username_available disallows unvailable names"""
     with self.assertRaises(ValidationError):
         validate_username_available(self.test_user.username)
コード例 #3
0
 def test_valid_name(self):
     """validate_username_available allows available names"""
     validate_username_available('BobBoberson')
     validate_username_available(self.test_user.username,
                                 exclude=self.test_user)
コード例 #4
0
 def test_valid_name(self):
     """validate_username_available allows available names"""
     validate_username_available('BobBoberson')
     validate_username_available(self.test_user.username, exclude=self.test_user)