def it_accepts_0():
     assert validate_bool(0) is False
 def it_accepts_true():
     assert validate_bool(True) is True
 def it_accepts_false():
     assert validate_bool(False) is False
예제 #4
0
 def it_accepts_1():
     assert validate_bool(1) is True
예제 #5
0
 def it_fails_on_string():
     with raises(ValidationError) as excinfo:
         validate_bool('random string')
     assert excinfo.value.code == INVALID_BOOL
 def test_it_accepts_false(self):
     assert validate_bool(False) is False
예제 #7
0
 def it_accepts_0():
     assert validate_bool(0) is False
예제 #8
0
 def test_it_accepts_1(self):
     assert validate_bool(1) is True
예제 #9
0
 def it_accepts_true():
     assert validate_bool(True) is True
예제 #10
0
 def test_it_accepts_false(self):
     assert validate_bool(False) is False
예제 #11
0
 def test_it_accepts_0(self):
     assert validate_bool(0) is False
예제 #12
0
 def test_it_accepts_true(self):
     assert validate_bool(True) is True
 def test_it_accepts_1(self):
     assert validate_bool(1) is True
 def test_it_accepts_0(self):
     assert validate_bool(0) is False
 def it_accepts_1():
     assert validate_bool(1) is True
예제 #16
0
 def it_accepts_false():
     assert validate_bool(False) is False
 def it_fails_on_string():
     with raises(ValidationError) as excinfo:
         validate_bool('random string')
     assert excinfo.value.code == INVALID_BOOL
 def test_it_accepts_true(self):
     assert validate_bool(True) is True