예제 #1
0
 def test_is_allowed_when_text(self):
     res = _is_allowed('test1')
     self.assertFalse(res)
예제 #2
0
 def test_is_allowed_when_none(self):
     res = _is_allowed(None)
     self.assertFalse(res)
예제 #3
0
 def test_is_allowed_when_float(self):
     res = _is_allowed(10.0)
     self.assertFalse(res)
예제 #4
0
 def test_is_allowed_when_complex(self):
     res = _is_allowed(2j)
     self.assertFalse(res)
예제 #5
0
 def test_is_allowed_when_int(self):
     res = _is_allowed(1)
     self.assertFalse(res)
예제 #6
0
 def test_is_allowed_when_bool(self):
     res = _is_allowed(True)
     self.assertFalse(res)
예제 #7
0
 def test_is_allowed_when_obj(self):
     res = _is_allowed(CustomTestClass('name1', 'description1'))
     self.assertTrue(res)
예제 #8
0
 def test_is_allowed_when_callable(self):
     res = _is_allowed(self.callable_x)
     self.assertTrue(res)
예제 #9
0
 def test_is_allowed_when_tuple(self):
     res = _is_allowed((1, ))
     self.assertTrue(res)
예제 #10
0
 def test_is_allowed_when_list(self):
     res = _is_allowed([])
     self.assertTrue(res)
예제 #11
0
 def test_is_allowed_when_dict(self):
     res = _is_allowed({})
     self.assertTrue(res)