Пример #1
0
 def test_not_string_four(self):
     self.assertEqual(cl(123496789012345678901),
                      (False, LengthError.BAD_TYPE))
Пример #2
0
 def test_nil_string(self):
     self.assertEqual(cl(None), (False, LengthError.NIL_STRING))
Пример #3
0
 def test_ok_greater_min_more(self):
     self.assertEqual(cl("123496789012345678901", 20),
                      (True, LengthError.OK))
Пример #4
0
 def test_not_string_three(self):
     self.assertEqual(cl(123496789012345678901, None),
                      (False, LengthError.BAD_TYPE))
Пример #5
0
 def test_not_ok_short_min(self):
     self.assertEqual(cl("1234", 4), (False, LengthError.SHORT_MIN))
Пример #6
0
 def test_not_ok_short_pass(self):
     self.assertEqual(cl("1234967890123456789", 20),
                      (False, LengthError.SHORT_PASS))
Пример #7
0
 def test_ok_three(self):
     self.assertEqual(cl("123456789012", 12), (True, LengthError.SHORT_MIN))
Пример #8
0
 def test_ok_short_min(self):
     self.assertEqual(cl("12345678901", 11), (True, LengthError.SHORT_MIN))
Пример #9
0
 def test_ok_two(self):
     self.assertEqual(cl("12345678901234567"), (True, LengthError.OK))
Пример #10
0
 def test_short_two(self):
     self.assertEqual(cl("123456789012345"),
                      (False, LengthError.SHORT_PASS))
Пример #11
0
 def test_short_one(self):
     self.assertEqual(cl("Hello"), (False, LengthError.SHORT_PASS))
Пример #12
0
 def test_nil_req_length_nones(self):
     self.assertEqual(cl("Hello", None), (False, LengthError.BAD_MIN))
Пример #13
0
 def test_nil_req_length(self):
     self.assertEqual(cl(None, None), (False, LengthError.NIL_STRING))