"""Tests for currencies model.""" from abacus_legacy_sync.models.currencies import Currencies from tests.utils.factories import CurrenciesFactory def test_create_currencies_entry(): """Test creating a row in a database.""" assert Currencies.count() == 0 CurrenciesFactory.create() assert Currencies.count() == 1 def test_get_by_iso_code(): """Test getting a currency by iso code.""" created_currency = CurrenciesFactory.create(ISO_4217_code='GBP') result = Currencies.get_by_iso_code('GBP') assert result is not None assert result.currency_id == created_currency.currency_id