Exemplo n.º 1
0
 def setUp(self):
     admin_user = AdminUserFactory.create()
     self.client.force_authenticate(user=admin_user)
     ProductCodeFactory.reset_sequence(1)
     self.product_code = ProductCodeFactory.create()
     self.complete_data = {
         "name": "Page Views",
         "unit": "100k",
         "price_per_unit": '0.0500',
         "included_units": '0.0000',
         "product_code": self.product_code.value
     }
Exemplo n.º 2
0
 def setUp(self):
     admin_user = AdminUserFactory.create()
     self.client.force_authenticate(user=admin_user)
     ProductCodeFactory.reset_sequence(1)
     self.product_code = ProductCodeFactory.create()
     self.complete_data = {
         "name": "Page Views",
         "unit": "100k",
         "price_per_unit": '0.0500',
         "included_units": '0.0000',
         "product_code": self.product_code.value
     }
Exemplo n.º 3
0
    def setUp(self):
        admin_user = AdminUserFactory.create()
        self.client.force_authenticate(user=admin_user)
        ProductCodeFactory.reset_sequence(1)
        self.user_product_code = ProductCodeFactory.create(
            value="user_product_code")
        self.user_feature_data = {
            "name": "Users",
            "unit": "user",
            "price_per_unit": '1.0000',
            "included_units": '0.0000',
            "product_code": self.user_product_code.value
        }

        self.minutes_product_code = ProductCodeFactory.create(
            value="minutes_product_code")
        self.minutes_data = {
            "name": "Minutes",
            "unit": "20 minutes / user",
            "price_per_unit": '5.0000',
            "included_units": '20.0000',
            "product_code": self.minutes_product_code.value,
        }

        self.link = self.minutes_data.copy()
        self.link['linked_feature'] = self.user_product_code.value
        self.link['linked_feature_calculation'] = "multiply"

        self.prebill_minutes_product_code = ProductCodeFactory.create(
            value="prebill_minutes_product_code")

        self.prebill_minutes_data = {
            "name": "Minutes",
            "unit": "20 minutes / user",
            "prebill_included_units": True,
            "price_per_unit": '5.0000',
            "included_units": '20.0000',
            "product_code": self.minutes_product_code.value,
        }