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()
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()
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()
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()
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) )
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()
def tearDown(self): generator.delete_all_subscriptions() generator.delete_all_accounts() super(TestExplicitCommunitySubscriptions, self).tearDown()
def tearDownClass(cls): generator.delete_all_subscriptions() generator.delete_all_accounts() cls.base_domain.delete() cls.user.delete() super(TestSubscriptionProperties, cls).tearDownClass()
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): CreditAdjustment.objects.all().delete() CreditLine.objects.all().delete() generator.delete_all_subscriptions() self.web_user.delete() super(TestCreditTransfers, self).tearDown()
def tearDown(self): generator.delete_all_subscriptions() generator.delete_all_accounts() super(TestRenewSubscriptions, self).tearDown() self.admin_user.delete()
def tearDownClass(cls): cls.sms_backend_mapping.delete() cls.sms_backend.delete() Domain.get_by_name(TEST_DOMAIN).delete() generator.delete_all_subscriptions()
def tearDown(self): CreditAdjustment.objects.all().delete() CreditLine.objects.all().delete() generator.delete_all_subscriptions() super(TestCreditTransfers, self).tearDown()
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()