예제 #1
0
class ClientWithManyProductsTest(unittest.TestCase):
    def setUp(self):
        super(ClientWithManyProductsTest, self).setUp()
        self.client = BaseTestFactory.create_clients_with_many_products()
        self.dict_client = self.client.as_dict()
        self.return_client = ClientWithManyProducts()
        self.return_client.map_dict(self.dict_client)

    def test_client_name_mapping(self):
        self.assertEqual(self.client.name, self.return_client.name, " name not mapped")

    def test_client_name_mapping(self):
        self.assertEqual(self.client.name, self.return_client.name, " name not mapped")

    def test_client_products_id_count(self):
        self.assertCountEqual(self.client.products_id, self.return_client.products_id,
                              "count of cl.products_id and cl.products_id are not the same")
예제 #2
0
class ClientWithManyProductsTest(unittest.TestCase):
    def setUp(self):
        super(ClientWithManyProductsTest, self).setUp()
        self.client = BaseTestFactory.create_clients_with_many_products()
        self.dict_client = self.client.as_dict()
        self.return_client = ClientWithManyProducts()
        self.return_client.map_dict(self.dict_client)

    def test_client_name_mapping(self):
        self.assertEqual(self.client.name, self.return_client.name,
                         " name not mapped")

    def test_client_name_mapping(self):
        self.assertEqual(self.client.name, self.return_client.name,
                         " name not mapped")

    def test_client_products_id_count(self):
        self.assertCountEqual(
            self.client.products_id, self.return_client.products_id,
            "count of cl.products_id and cl.products_id are not the same")
예제 #3
0
 def setUp(self):
     super(ClientWithManyProductsTest, self).setUp()
     self.client = BaseTestFactory.create_clients_with_many_products()
     self.dict_client = self.client.as_dict()
     self.return_client = ClientWithManyProducts()
     self.return_client.map_dict(self.dict_client)
예제 #4
0
 def setUp(self):
     super(ClientWithManyProductsTest, self).setUp()
     self.client = BaseTestFactory.create_clients_with_many_products()
     self.dict_client = self.client.as_dict()
     self.return_client = ClientWithManyProducts()
     self.return_client.map_dict(self.dict_client)