Fix unit tests (#62)
This commit is contained in:
@@ -3,6 +3,7 @@ import flask_testing
|
||||
from api import create_app, db
|
||||
from api.models.product import Material, Product, Currencies
|
||||
from api.models import Inquiry, Designer, Market
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
class TestEndpoints(flask_testing.TestCase):
|
||||
@@ -11,10 +12,13 @@ class TestEndpoints(flask_testing.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
db.create_all()
|
||||
self._price_adjustments_patcher = patch('api.lib.prices.get_price_adjustment', return_value=1.0)
|
||||
self._price_adjustments_patcher.start()
|
||||
|
||||
def tearDown(self):
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
self._price_adjustments_patcher.stop()
|
||||
|
||||
def _add_market(self):
|
||||
currency = Currencies(iso3char="SEK", exchange_rate=1)
|
||||
|
||||
Reference in New Issue
Block a user