def tearDown(self):
        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        generator.delete_all_subscriptions()
        generator.delete_all_accounts()
 def tearDown(self):
     super(TestCreditAdjustmentValidation, self).tearDown()
     CreditAdjustment.objects.all().delete()
     LineItem.objects.all().delete()
     Invoice.objects.all().delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
Beispiel #3
0
    def tearDown(self):
        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        generator.delete_all_subscriptions()
        generator.delete_all_accounts()
        super(TestSubscription, self).tearDown()
Beispiel #4
0
 def tearDownClass(cls):
     MobileBackend.load_by_name(TEST_DOMAIN, TEST_BACKEND).delete()
     CommCareUser.get_by_username('stella').delete()
     CommCareUser.get_by_username('super').delete()
     delete_all_locations()
     LocationType.objects.all().delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     EWSGhanaConfig.for_domain(TEST_DOMAIN).delete()
     DocDomainMapping.objects.all().delete()
     generator.delete_all_subscriptions()
     Domain.get_by_name(TEST_DOMAIN).delete()
Beispiel #5
0
 def tearDownClass(cls):
     MobileBackend.load_by_name(TEST_DOMAIN, TEST_BACKEND).delete()
     CommCareUser.get_by_username('stella').delete()
     CommCareUser.get_by_username('super').delete()
     delete_all_locations()
     LocationType.objects.all().delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     EWSGhanaConfig.for_domain(TEST_DOMAIN).delete()
     DocDomainMapping.objects.all().delete()
     generator.delete_all_subscriptions()
     Domain.get_by_name(TEST_DOMAIN).delete()
    def tearDown(self):
        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        CreditAdjustment.objects.all().delete()
        CreditLine.objects.all().delete()

        BillingRecord.objects.all().delete()
        LineItem.objects.all().delete()
        SubscriptionAdjustment.objects.all().delete()
        Invoice.objects.all().delete()
        generator.delete_all_subscriptions()
        generator.delete_all_accounts()
Beispiel #7
0
    def tearDown(self):
        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        CreditAdjustment.objects.all().delete()
        CreditLine.objects.all().delete()

        BillingRecord.objects.all().delete()
        LineItem.objects.all().delete()
        SubscriptionAdjustment.objects.all().delete()
        Invoice.objects.all().delete()
        generator.delete_all_subscriptions()
        generator.delete_all_accounts()
Beispiel #8
0
    def setUp(self):
        super(TestContractedInvoices, self).setUp()
        generator.delete_all_subscriptions()

        self.subscription, self.subscription_length = generator.generate_domain_subscription_from_date(
            generator.get_start_date(),
            self.account,
            self.domain.name,
            min_num_months=self.min_subscription_length,
            service_type=SubscriptionType.CONTRACTED,
        )

        self.invoice_date = utils.months_from_date(
            self.subscription.date_start, random.randint(2, self.subscription_length)
        )
Beispiel #9
0
 def tearDownClass(cls):
     CommCareUser.get_by_username("stella").delete()
     CommCareUser.get_by_username("super").delete()
     FacilityInCharge.objects.all().delete()
     delete_all_locations()
     LocationType.objects.all().delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     EWSGhanaConfig.for_domain(TEST_DOMAIN).delete()
     DocDomainMapping.objects.all().delete()
     generator.delete_all_subscriptions()
     cls.sms_backend_mapping.delete()
     cls.backend.delete()
     Domain.get_by_name(TEST_DOMAIN).delete()
Beispiel #10
0
    def setUp(self):
        super(TestContractedInvoices, self).setUp()
        generator.delete_all_subscriptions()

        self.subscription, self.subscription_length = generator.generate_domain_subscription_from_date(
            generator.get_start_date(),
            self.account,
            self.domain.name,
            min_num_months=self.min_subscription_length,
            service_type=SubscriptionType.CONTRACTED,
        )

        self.invoice_date = utils.months_from_date(
            self.subscription.date_start,
            random.randint(2, self.subscription_length))
Beispiel #11
0
 def tearDownClass(cls):
     MobileBackend.load_by_name(TEST_DOMAIN, TEST_BACKEND).delete()
     CommCareUser.get_by_username('stella').delete()
     CommCareUser.get_by_username('bella').delete()
     CommCareUser.get_by_username('trella').delete()
     CommCareUser.get_by_username('msd_person').delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     ILSGatewayConfig.for_domain(TEST_DOMAIN).delete()
     DocDomainMapping.objects.all().delete()
     Location.by_site_code(TEST_DOMAIN, 'loc1').delete()
     Location.by_site_code(TEST_DOMAIN, 'loc2').delete()
     Location.by_site_code(TEST_DOMAIN, 'dis1').delete()
     Location.by_site_code(TEST_DOMAIN, 'reg1').delete()
     Location.by_site_code(TEST_DOMAIN, 'moh1').delete()
     SQLLocation.objects.all().delete()
     generator.delete_all_subscriptions()
     Domain.get_by_name(TEST_DOMAIN).delete()
Beispiel #12
0
    def setUp(self):
        super(TestContractedInvoices, self).setUp()
        generator.delete_all_subscriptions()

        self.subscription_length = self.min_subscription_length
        subscription_start_date = datetime.date(2016, 2, 23)
        subscription_end_date = add_months_to_date(subscription_start_date, self.subscription_length)
        self.subscription = generator.generate_domain_subscription(
            self.account,
            self.domain,
            date_start=subscription_start_date,
            date_end=subscription_end_date,
            service_type=SubscriptionType.CONTRACTED,
        )

        self.invoice_date = utils.months_from_date(
            self.subscription.date_start,
            random.randint(2, self.subscription_length)
        )
Beispiel #13
0
 def tearDownClass(cls):
     MobileBackend.load_by_name(TEST_DOMAIN, TEST_BACKEND).delete()
     CommCareUser.get_by_username('stella').delete()
     CommCareUser.get_by_username('bella').delete()
     CommCareUser.get_by_username('trella').delete()
     CommCareUser.get_by_username('msd_person').delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     ILSGatewayConfig.for_domain(TEST_DOMAIN).delete()
     DocDomainMapping.objects.all().delete()
     Location.by_site_code(TEST_DOMAIN, 'loc1').delete()
     Location.by_site_code(TEST_DOMAIN, 'loc2').delete()
     Location.by_site_code(TEST_DOMAIN, 'dis1').delete()
     Location.by_site_code(TEST_DOMAIN, 'reg1').delete()
     Location.by_site_code(TEST_DOMAIN, 'moh1').delete()
     SQLLocation.objects.all().delete()
     generator.delete_all_subscriptions()
     Domain.get_by_name(TEST_DOMAIN).delete()
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestUserRoleSubscriptionChanges, self).tearDown()
 def tearDown(self):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestRenewSubscriptions, self).tearDown()
     self.admin_user.delete()
 def tearDown(self):
     CreditAdjustment.objects.all().delete()
     CreditLine.objects.all().delete()
     generator.delete_all_subscriptions()
     super(TestCreditTransfers, self).tearDown()
Beispiel #18
0
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.backend.delete()
     generator.delete_all_subscriptions()
Beispiel #19
0
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
    def tearDown(self):
        self.billing_contact.delete()
        self.dimagi_user.delete()

        generator.delete_all_subscriptions()
        generator.delete_all_accounts()
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.sms_backend.delete()
     Domain.get_by_name(TEST_DOMAIN).delete()
     generator.delete_all_subscriptions()
 def tearDownClass(cls):
     SupplyPointStatus.objects.all().delete()
     StockTransaction.objects.all().delete()
     StockReport.objects.all().delete()
     generator.delete_all_subscriptions()
 def tearDown(self):
     self.project.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestSubscriptionPermissionsChanges, self).tearDown()
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestUserRoleSubscriptionChanges, self).tearDown()