Пример #1
0
 def test_client_attribute_is_None(self):
     """testing if the client attribute is set to None will not cause any
     error
     """
     new_client = Client(name="Test Client")
     new_proj = Project(name="Test Project", client=new_client)
     new_proj.client = None
     self.assertEqual(None, new_proj.client)
Пример #2
0
 def test_client_attribute_is_None(self):
     """testing if the client attribute is set to None will not cause any
     error
     """
     new_client = Client(name="Test Client")
     new_proj = Project(name="Test Project", client=new_client)
     new_proj.client = None
     self.assertEqual(None, new_proj.client)
Пример #3
0
 def test_client_attribute_is_working_properly(self):
     """testing if the client attribute is working properly
     """
     new_client1 = Client(name='Test Client 1')
     new_client2 = Client(name='Test Client 2')
     new_proj = Project(name='Test Project', client=new_client1)
     self.assertNotEqual(new_client2, new_proj.client)
     new_proj.client = new_client2
     self.assertEqual(new_client2, new_proj.client)
Пример #4
0
 def test_client_attribute_is_working_properly(self):
     """testing if the client attribute is working properly
     """
     new_client1 = Client(name='Test Client 1')
     new_client2 = Client(name='Test Client 2')
     new_proj = Project(name='Test Project', client=new_client1)
     self.assertNotEqual(new_client2, new_proj.client)
     new_proj.client = new_client2
     self.assertEqual(new_client2, new_proj.client)