def test_bool_with_data(self):
     p = Profile(FAKE_DATA["id_"], FAKE_DATA["username"])
     self.assertTrue(p)
     self.assertTrue(p.__bool__())
     self.assertTrue(p.__nonzero__())
 def test_bool_only_id(self):
     p = Profile(id_=FAKE_DATA["id_"])
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())
 def test_bool_only_name(self):
     p = Profile(name=FAKE_DATA["username"])
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())
 def test_bool_no_data(self):
     p = Profile()
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())
Example #5
0
 def test_bool_with_data(self):
     p = Profile(FAKE_DATA["id_"], FAKE_DATA["username"])
     self.assertTrue(p)
     self.assertTrue(p.__bool__())
     self.assertTrue(p.__nonzero__())
Example #6
0
 def test_bool_only_name(self):
     p = Profile(name=FAKE_DATA["username"])
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())
Example #7
0
 def test_bool_only_id(self):
     p = Profile(id_=FAKE_DATA["id_"])
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())
Example #8
0
 def test_bool_no_data(self):
     p = Profile()
     self.assertFalse(p)
     self.assertFalse(p.__bool__())
     self.assertFalse(p.__nonzero__())