Fixed test using manual exchange backend, template update

This commit is contained in:
eeintech 2021-05-25 11:39:04 -04:00
parent 93bfe4c5f1
commit b04ad48178
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ from .models import Company, Contact, ManufacturerPart, SupplierPart
from .models import rename_company_image
from part.models import Part
from InvenTree.exchange import get_exchange_rate_backend
from InvenTree.exchange import InvenTreeManualExchangeBackend
from djmoney.contrib.exchange.models import Rate
@ -42,7 +42,7 @@ class CompanySimpleTest(TestCase):
self.zergm312 = SupplierPart.objects.get(SKU='ZERGM312')
# Exchange rate backend
backend = get_exchange_rate_backend()
backend = InvenTreeManualExchangeBackend()
backend.update_rates(base_currency=backend.base_currency)
Rate.objects.create(

View File

@ -45,7 +45,7 @@
{{ block.super }}
{% if api_rates_success is False %}
var alert_msg = {% blocktrans %}"Failed to refresh exchange rates. Verify your API key and/or subscription plan" {% endblocktrans %};
var alert_msg = {% blocktrans %}"Failed to refresh exchange rates" {% endblocktrans %};
showAlertOrCache("alert-danger", alert_msg, null, 5000);
{% endif %}