Exemplo n.º 1
0
 def test_invalid_characters(self):
     invalid_chars = [
         '+', '-', '$', '%', '^', '&', '*', '(', ')', '!', '@', '#', '<',
         '>', '?', '/', '\\', '[', ']', '{', '}', '='
     ]
     for char in invalid_chars:
         with self.assertRaises(ValueError):
             color('aqua{0}marine'.format(char))
Exemplo n.º 2
0
 def test_color_with_space(self):
     self.assertEqual({'color': 'aqua marine'}, color('aqua marine'),
                      'Expect color with space to be returned')
Exemplo n.º 3
0
 def test_color_with_camelcase(self):
     self.assertEqual({'color': 'BluE'}, color('BluE'),
                      'Expect color with camelcase letters to be returned')
     self.assertEqual({'color': 'bluE'}, color('bluE'),
                      'Expect color with camelcase letters to be returned')
Exemplo n.º 4
0
 def test_color_with_all_uppercase(self):
     self.assertEqual(
         {'color': 'BLUE'}, color('BLUE'),
         'Expect color with all uppercase letters to be returned')
Exemplo n.º 5
0
 def test_color_with_all_lowercase(self):
     self.assertEqual(
         {'color': 'blue'}, color('blue'),
         'Expect color with all lowercase letters to be returned')
Exemplo n.º 6
0
 def test_color_with_capitalize_letter(self):
     self.assertEqual({'color': 'Blue'}, color('Blue'),
                      'Expect color with capitalize word to be returned')