def test_create(self):
     customs_item = shippo.CustomsItem.create(**DUMMY_CUSTOMS_ITEM)
     customs_declaration_parameters = DUMMY_CUSTOMS_DECLARATION.copy()
     customs_declaration_parameters["items"][0] = customs_item.object_id
     CustomsDeclaration = shippo.CustomsDeclaration.create(
         **customs_declaration_parameters)
     self.assertEqual(CustomsDeclaration.object_state, 'VALID')
Esempio n. 2
0
 def test_create(self):
     customs_item = shippo.CustomsItem.create(**DUMMY_CUSTOMS_ITEM)
     customs_declaration_parameters = DUMMY_CUSTOMS_DECLARATION.copy()
     customs_declaration_parameters["items"][0] = customs_item.object_id
     CustomsDeclaration = shippo.CustomsDeclaration.create(
         **customs_declaration_parameters)
     self.assertEqual(CustomsDeclaration.object_state, 'VALID')
 def test_retrieve(self):
     customs_item = shippo.CustomsItem.create(**DUMMY_CUSTOMS_ITEM)
     customs_declaration_parameters = DUMMY_CUSTOMS_DECLARATION.copy()
     customs_declaration_parameters["items"][0] = customs_item.object_id
     CustomsDeclaration = shippo.CustomsDeclaration.create(**customs_declaration_parameters)
     # Test Retrieving Object
     retrieve = shippo.CustomsDeclaration.retrieve(CustomsDeclaration.object_id)
     self.assertItemsEqual(CustomsDeclaration, retrieve)
Esempio n. 4
0
 def test_retrieve(self):
     customs_item = shippo.CustomsItem.create(**DUMMY_CUSTOMS_ITEM)
     customs_declaration_parameters = DUMMY_CUSTOMS_DECLARATION.copy()
     customs_declaration_parameters["items"][0] = customs_item.object_id
     CustomsDeclaration = shippo.CustomsDeclaration.create(
         **customs_declaration_parameters)
     # Test Retrieving Object
     retrieve = shippo.CustomsDeclaration.retrieve(
         CustomsDeclaration.object_id)
     self.assertItemsEqual(CustomsDeclaration, retrieve)