def test_as_bool_returns_True_anything_other_than_0_or_False(self): self.assertTrue(helpers.as_bool({})) self.assertTrue(helpers.as_bool("")) self.assertTrue(helpers.as_bool(10))
def test_as_bool_returns_false_if_0_or_False(self): self.assertFalse(helpers.as_bool(0)) self.assertFalse(helpers.as_bool(False))