def testAddAddress(self):
        """
        """
        am = IAddressManagement(self.customer)
        id = am.addAddress("Doe Str. 1", "App. 1", "4711", "Doe City",
                           "Germany")

        ids = [a.getId() for a in am.getAddresses()]
        self.assertEqual(ids, ["address_1", "address_2", "address_3", id])
 def testAddAddress(self):
     """
     """
     am = IAddressManagement(self.customer)
     id = am.addAddress(
         "Doe Str. 1",
         "App. 1",
         "4711",
         "Doe City",
         "Germany"
     )
             
     ids = [a.getId() for a in am.getAddresses()]        
     self.assertEqual(ids, ["address_1", "address_2", "address_3", id])
Exemple #3
0
    def testIsComplete(self):
        """
        """
        c = ICompleteness(self.shop.customers.customer)
        self.assertEqual(c.isComplete(), False)

        am = IAddressManagement(self.customer)
        id = am.addAddress("Doe Str. 1", "App. 1", "4711", "Doe City",
                           "Germany")

        self.customer.setInvoiceAddressAsString(id)
        self.customer.setShippingAddressAsString(id)
        self.assertEqual(c.isComplete(), False)

        view = getMultiAdapter((self.shop.products.product_1,
                                self.shop.products.product_1.REQUEST),
                               name="addToCart")
        view.addToCart()

        self.assertEqual(c.isComplete(), True)
 def testIsComplete(self):
     """
     """        
     c = ICompleteness(self.shop.customers.customer)
     self.assertEqual(c.isComplete(), False)
     
     am = IAddressManagement(self.customer)
     id = am.addAddress(
         "Doe Str. 1",
         "App. 1",
         "4711",
         "Doe City",
         "Germany"
     )
     
     self.customer.setInvoiceAddressAsString(id)        
     self.customer.setShippingAddressAsString(id)
     self.assertEqual(c.isComplete(), False)
     
     view = getMultiAdapter((self.shop.products.product_1, self.shop.products.product_1.REQUEST), name="addToCart")
     view.addToCart()
     
     self.assertEqual(c.isComplete(), True)