コード例 #1
0
 def tearDown(self):
     CreditAdjustment.objects.all().delete()
     LineItem.objects.all().delete()
     Invoice.objects.all().delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestCreditAdjustmentValidation, self).tearDown()
コード例 #2
0
 def tearDownClass(cls):
     SupplyPointStatus.objects.all().delete()
     StockTransaction.objects.all().delete()
     StockReport.objects.all().delete()
     generator.delete_all_subscriptions()
     cls.domain.delete()
     super(TestReportRunner, cls).tearDownClass()
コード例 #3
0
 def tearDown(self):
     CreditAdjustment.objects.all().delete()
     LineItem.objects.all().delete()
     Invoice.objects.all().delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestCreditAdjustmentValidation, self).tearDown()
コード例 #4
0
 def tearDownClass(cls):
     SupplyPointStatus.objects.all().delete()
     StockTransaction.objects.all().delete()
     StockReport.objects.all().delete()
     generator.delete_all_subscriptions()
     cls.domain.delete()
     super(TestReportRunner, cls).tearDownClass()
コード例 #5
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()
コード例 #6
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()
コード例 #7
0
    def tearDown(self):
        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()

        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        super(BaseInvoiceTestCase, self).tearDown()
コード例 #8
0
    def tearDown(self):
        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()

        self.billing_contact.delete()
        self.dimagi_user.delete()
        self.domain.delete()

        super(BaseInvoiceTestCase, self).tearDown()
コード例 #9
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.IMPLEMENTATION,
        )

        self.invoice_date = utils.months_from_date(
            self.subscription.date_start,
            random.randint(2, self.subscription_length)
        )
コード例 #10
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.IMPLEMENTATION,
        )

        self.invoice_date = utils.months_from_date(
            self.subscription.date_start,
            random.randint(2, self.subscription_length)
        )
コード例 #11
0
 def tearDownClass(cls):
     delete_domain_phone_numbers(TEST_DOMAIN)
     if cls.sms_backend_mapping.id is not None:
         cls.sms_backend_mapping.delete()
     if cls.sms_backend.id is not None:
         cls.sms_backend.delete()
     for username in [
         'stella',
         'bella',
         'trella',
         'msd_person',
     ]:
         user = CommCareUser.get_by_username(username)
         if user:
             user.delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     ils_gateway_config = ILSGatewayConfig.for_domain(TEST_DOMAIN)
     if ils_gateway_config:
         ils_gateway_config.delete()
     DocDomainMapping.objects.all().delete()
     for site_code in [
         'loc1',
         'loc2',
         'dis1',
         'reg1',
         'moh1',
     ]:
         location = Location.by_site_code(TEST_DOMAIN, site_code)
         if location:
             location.delete()
     SQLLocation.objects.all().delete()
     generator.delete_all_subscriptions()
     test_domain = Domain.get_by_name(TEST_DOMAIN)
     if test_domain:
         test_domain.delete()
     super(ILSTestScript, cls).tearDownClass()
コード例 #12
0
 def tearDownClass(cls):
     delete_domain_phone_numbers(TEST_DOMAIN)
     if cls.sms_backend_mapping.id is not None:
         cls.sms_backend_mapping.delete()
     if cls.sms_backend.id is not None:
         cls.sms_backend.delete()
     for username in [
         'stella',
         'bella',
         'trella',
         'msd_person',
     ]:
         user = CommCareUser.get_by_username(username)
         if user:
             user.delete()
     for product in Product.by_domain(TEST_DOMAIN):
         product.delete()
     SQLProduct.objects.all().delete()
     ils_gateway_config = ILSGatewayConfig.for_domain(TEST_DOMAIN)
     if ils_gateway_config:
         ils_gateway_config.delete()
     DocDomainMapping.objects.all().delete()
     for site_code in [
         'loc1',
         'loc2',
         'dis1',
         'reg1',
         'moh1',
     ]:
         location = Location.by_site_code(TEST_DOMAIN, site_code)
         if location:
             location.delete()
     SQLLocation.objects.all().delete()
     generator.delete_all_subscriptions()
     test_domain = Domain.get_by_name(TEST_DOMAIN)
     if test_domain:
         test_domain.delete()
     super(ILSTestScript, cls).tearDownClass()
コード例 #13
0
 def tearDown(self):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestExplicitCommunitySubscriptions, self).tearDown()
コード例 #14
0
 def tearDownClass(cls):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     cls.base_domain.delete()
     cls.user.delete()
     super(TestSubscriptionProperties, cls).tearDownClass()
コード例 #15
0
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestUserRoleSubscriptionChanges, self).tearDown()
コード例 #16
0
 def tearDown(self):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestExplicitCommunitySubscriptions, self).tearDown()
コード例 #17
0
 def tearDown(self):
     CreditAdjustment.objects.all().delete()
     CreditLine.objects.all().delete()
     generator.delete_all_subscriptions()
     self.web_user.delete()
     super(TestCreditTransfers, self).tearDown()
コード例 #18
0
 def tearDown(self):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestRenewSubscriptions, self).tearDown()
     self.admin_user.delete()
コード例 #19
0
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.sms_backend.delete()
     Domain.get_by_name(TEST_DOMAIN).delete()
     generator.delete_all_subscriptions()
コード例 #20
0
 def tearDown(self):
     CreditAdjustment.objects.all().delete()
     CreditLine.objects.all().delete()
     generator.delete_all_subscriptions()
     super(TestCreditTransfers, self).tearDown()
コード例 #21
0
 def tearDown(self):
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestRenewSubscriptions, self).tearDown()
     self.admin_user.delete()
コード例 #22
0
ファイル: utils.py プロジェクト: zbidi/commcare-hq
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.backend.delete()
     generator.delete_all_subscriptions()
     super(EWSTestCase, cls).tearDownClass()
 def tearDown(self):
     self.project.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestSubscriptionPermissionsChanges, self).tearDown()
コード例 #24
0
 def tearDown(self):
     self.project.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestSubscriptionPermissionsChanges, self).tearDown()
コード例 #25
0
 def tearDown(self):
     self.domain.delete()
     self.admin_user.delete()
     generator.delete_all_subscriptions()
     generator.delete_all_accounts()
     super(TestUserRoleSubscriptionChanges, self).tearDown()
コード例 #26
0
ファイル: test_reminders.py プロジェクト: zbidi/commcare-hq
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.sms_backend.delete()
     Domain.get_by_name(TEST_DOMAIN).delete()
     generator.delete_all_subscriptions()
コード例 #27
0
 def tearDownClass(cls):
     cls.sms_backend_mapping.delete()
     cls.backend.delete()
     generator.delete_all_subscriptions()
     super(EWSTestCase, cls).tearDownClass()