Esempio n. 1
0
File: tests.py Progetto: pdc/kanbo
 def test_it_rejects_empty_names(self):
     for name in [None, '']:
         self.assertTrue(username_rejected(name),
                 u'Expected \'{0!r}\' to be rejected'.format(name))
Esempio n. 2
0
File: tests.py Progetto: pdc/kanbo
 def test_it_rejects_url_prefixes(self):
     for name in ['about', 'hello', 'boards']:
         self.assertTrue(username_rejected(name),
                 u'Expected \'{0}\' to be rejected'.format(name))
Esempio n. 3
0
File: tests.py Progetto: pdc/kanbo
 def test_it_accepts_nonexisting_user_name(self):
     self.assertFalse(username_rejected('hermione'))
Esempio n. 4
0
File: tests.py Progetto: pdc/kanbo
 def test_it_rejects_numbers(self):
     self.assertTrue(username_rejected('42'))
     self.assertTrue(username_rejected('-1'))
Esempio n. 5
0
File: tests.py Progetto: pdc/kanbo
 def test_it_rejects_existing_user_name(self):
     self.assertTrue(username_rejected('alice'))