Пример #1
0
 def test_percent_discount_value_saved_for_membership(self):
     """
     this will verify that a the membership percent discount is saved and persist
     """
     membership_type = "gold"
     percent_discount = 50
     new_membership = Membership(membership_type, percent_discount)
     self.assertEqual(new_membership.get_discount(), percent_discount)
Пример #2
0
 def test_membership_is_saved_in_database(self):
     """
     this will verify that the membership values are saved on db as expected
     """
     membership_type = "blue"
     percent_discount = 40
     start_date = 10/10/2015
     new_membership = Membership(membership_type, percent_discount, start_date)
     new_membership.save_membership()
     self.assertEqual(new_membership.get_discount(membership_type), percent_discount)
Пример #3
0
 def test_percent_discount_value_saved_for_membership(self):
     """
     this will verify that a the membership percent discount is saved and persist
     """
     membership_type = "gold"
     percent_discount = 50
     start_date = 10 / 10 / 2015
     new_membership = Membership(membership_type, percent_discount,
                                 start_date)
     self.assertEqual(new_membership.get_discount(membership_type),
                      percent_discount)
Пример #4
0
 def test_membership_is_saved_in_database(self):
     """
     this will verify that the membership values are saved on db as expected
     """
     membership_type = "blue"
     percent_discount = 40
     start_date = 10 / 10 / 2015
     new_membership = Membership(membership_type, percent_discount,
                                 start_date)
     new_membership.save_membership()
     self.assertEqual(new_membership.get_discount(membership_type),
                      percent_discount)