Exemple #1
0
 def test_happy_path(self):
     try:
         parsers.KeyExtensionInterface("0")
         parsers.KeyExtensionInterface("113")
         parsers.KeyExtensionInterface("2w")
         parsers.KeyExtensionInterface("3m")
         parsers.KeyExtensionInterface("54y")
     except UsageError:
         self.fail(
             'more than one digit, key extension option, raises exceptions')
Exemple #2
0
 def test_more_than_y_is_not_allowed_option(self):
     with self.assertRaises(UsageError):
         parsers.KeyExtensionInterface("9yy")
Exemple #3
0
 def test_letters_before_a_number_is_not_allowed(self):
     with self.assertRaises(UsageError):
         parsers.KeyExtensionInterface("w3")
Exemple #4
0
 def test_negative_number_is_not_allowed(self):
     with self.assertRaises(UsageError):
         parsers.KeyExtensionInterface("-1")
Exemple #5
0
 def test_anything_that_is_not_w_y_m_is_not_allowed(self):
     with self.assertRaises(UsageError):
         parsers.KeyExtensionInterface("2x")