def setUp(self): """ Set up test objects. """ self.admin = UserFactory(is_staff=True) self.provider_account = AccountFactory(business_name='Developer', user__username='******') self.client_account = AccountFactory(business_name='OpenCraft GmbH', user__username='******') self.invoice = factories.InvoiceFactory(provider=self.provider_account, client=self.client_account, date=NOW) super().setUp()
def setUp(self): """ Setup test objects. """ self.provider = AccountFactory(business_name='Developer') self.client = AccountFactory(business_name='OpenCraft GmbH') self.invoice = InvoiceFactory(provider=self.provider, client=self.client) self.payment = factories.TransferWisePaymentFactory( date=NOW, invoice=self.invoice) super().setUp()
def create_client_and_provider_links(self): """ Create a client and some providers, and link them with hourly rates. """ # pylint: disable=attribute-defined-outside-init self.client = AccountFactory(business_name='OpenCraft GmbH', user__username='******', user__email='*****@*****.**') self.provider1 = AccountFactory() self.provider2 = AccountFactory() self.hourly_rate1 = HourlyRateFactory(client=self.client, provider=self.provider1, hourly_rate__currency='EUR') self.hourly_rate2 = HourlyRateFactory(client=self.client, provider=self.provider2, hourly_rate__currency='EUR')
def setUp(self): """ Set up test objects. """ self.provider = AccountFactory(business_name='Developer', user__username='******') self.invoice_template = factories.InvoiceTemplateFactory( provider=self.provider) super().setUp()
def setUp(self): """ Set up test objects. """ self.bank = factories.BankFactory(name='Bank Name') self.bank_account_holder = AccountFactory( business_name='OpenCraft GmbH', user__username='******') self.bank_account = factories.BankAccountFactory( bank=self.bank, user_account=self.bank_account_holder, type=factories.BankAccountType.CHECKING) super().setUp()
def create_client_and_provider_links(self): """ Create a client and some providers, and link them with hourly rates. Differs from the super `create_client_and_provider_links` by using a different name for the client variable, since `APITestCase` already uses `self.client`. """ # pylint: disable=attribute-defined-outside-init self.client_account = AccountFactory( business_name='OpenCraft GmbH', user__username='******', user__email='*****@*****.**') self.provider1 = AccountFactory() self.provider2 = AccountFactory() self.hourly_rate1 = HourlyRateFactory(client=self.client_account, provider=self.provider1, hourly_rate__currency='EUR') self.hourly_rate2 = HourlyRateFactory(client=self.client_account, provider=self.provider2, hourly_rate__currency='EUR')
def setUp(self): """ Set up test objects. """ self.sender = AccountFactory(business_name='OpenCraft GmbH') self.payment1 = self._create_payment( recipient_bank_account_kwargs={ 'transferwise_recipient_id': 1, 'user_account__business_name': 'Developer 1', 'identification': { 'account_number': 10, 'currency': 'PKR', } }) self.payment2 = self._create_payment( recipient_bank_account_kwargs={ 'transferwise_recipient_id': 2, 'user_account__business_name': 'Developer 2', 'identification': { 'account_number': 11, 'currency': 'USD', } }) self.mixin = mixins.TransferWiseCsvMixin() self.csv_path = '' super().setUp()
def setUp(self): """ Set up test objects. """ self.sender = AccountFactory(business_name='OpenCraft GmbH', user__username='******') self.bulk_payment = factories.TransferWiseBulkPaymentFactory(date=NOW) super().setUp()