예제 #1
0
 def test_large_name(self):
     username = trim_to_valid_length(
         'thisisaverylongnamethatisinfacttoolong', '.itsi')
     self.assertEqual(len(username), 30)
예제 #2
0
 def test_large_name(self):
     username = trim_to_valid_length(
         'thisisaverylongnamethatisinfacttoolong', '.itsi')
     self.assertEqual(len(username), 30)
예제 #3
0
 def test_small_name(self):
     username = trim_to_valid_length('shortname', '.itsi')
     self.assertLessEqual(len(username), 30)
     self.assertEqual(
         username, 'shortname.itsi', 'The short name should ' +
         'be concatenated but otherwise unmodified')
예제 #4
0
 def test_small_name(self):
     username = trim_to_valid_length('shortname', '.itsi')
     self.assertLessEqual(len(username), 30)
     self.assertEqual(username, 'shortname.itsi', 'The short name should ' +
                      'be concatenated but otherwise unmodified')