Ejemplo n.º 1
0
    def setUp(self):
        super(TestGatewayFee, self).setUp()
        self.currency_usd = init_default_currency()

        self.backend_ids = generator.arbitrary_backend_ids()
        self.message_logs = generator.arbitrary_messages_by_backend_and_direction(
            self.backend_ids)

        self.least_specific_fees = generator.arbitrary_fees_by_direction_and_backend(
        )
        self.country_code_fees = generator.arbitrary_fees_by_country()
        self.instance_fees = generator.arbitrary_fees_by_backend_instance(
            self.backend_ids)
        self.most_specific_fees = generator.arbitrary_fees_by_all(
            self.backend_ids)
        self.country_code_and_prefixes = generator.arbitrary_country_code_and_prefixes(
            3, 3)
        self.prefix_fees = generator.arbitrary_fees_by_prefix(
            self.backend_ids, self.country_code_and_prefixes)

        self.other_currency = generator.arbitrary_currency()

        # Must remove existing data populated in migrations
        SmsGatewayFee.objects.all().delete()
        SmsGatewayFeeCriteria.objects.all().delete()
Ejemplo n.º 2
0
    def setUp(self):
        super(TestGatewayFee, self).setUp()
        self.currency_usd = init_default_currency()

        self.backend_ids = generator.arbitrary_backend_ids()
        self.message_logs = generator.arbitrary_messages_by_backend_and_direction(self.backend_ids)

        self.least_specific_fees = generator.arbitrary_fees_by_direction_and_backend()
        self.country_code_fees = generator.arbitrary_fees_by_country()
        self.instance_fees = generator.arbitrary_fees_by_backend_instance(self.backend_ids)
        self.most_specific_fees = generator.arbitrary_fees_by_all(self.backend_ids)
        self.country_code_and_prefixes = generator.arbitrary_country_code_and_prefixes(3, 3)
        self.prefix_fees = generator.arbitrary_fees_by_prefix(self.backend_ids, self.country_code_and_prefixes)

        self.other_currency = generator.arbitrary_currency()

        # Must remove existing data populated in migrations
        SmsGatewayFee.objects.all().delete()
        SmsGatewayFeeCriteria.objects.all().delete()