def test_save__set_primary__turns_off_other_primary(self): currency = GBPCurrencyFactory(primary=False, accepted=False) currency.primary = True currency.save() # Make Euro primary currency currency = EURCurrencyFactory(primary=False, accepted=False) currency.primary = True currency.save() currency = Currency.objects.get(iso_4217_code="GBP") self.assertFalse(currency.primary)
def test_save__set_primary__sets_accepted(self): currency = GBPCurrencyFactory(primary=False, accepted=False) currency.primary = True currency.save() currency = Currency.objects.get(iso_4217_code="GBP") self.assertTrue(currency.primary) self.assertTrue(currency.accepted)
def setUp(self): # Set primary currency + accepted currencies EURCurrencyFactory() USDCurrencyFactory() currency = GBPCurrencyFactory() currency.primary = True currency.save() Currency.objects.update(accepted=True)
def setUp(self): # Set primary currency + accepted currencies EURCurrencyFactory() USDCurrencyFactory() currency = GBPCurrencyFactory() currency.primary = True currency.save() Currency.objects.update(accepted=True)
def setUp(self): self.client = FixerExchangeRateClient() # Set primary currency + accepted currencies EURCurrencyFactory() USDCurrencyFactory() currency = GBPCurrencyFactory() currency.primary = True currency.save() Currency.objects.update(accepted=True)
def setUp(self): self.client = FixerExchangeRateClient() # Set primary currency + accepted currencies EURCurrencyFactory() USDCurrencyFactory() currency = GBPCurrencyFactory() currency.primary = True currency.save() Currency.objects.update(accepted=True)