Fix tests

This commit is contained in:
Mark Veidemanis 2022-04-19 21:02:39 +01:00
parent 98103c5680
commit 506fe82801
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 49 additions and 0 deletions

View File

@ -28,6 +28,30 @@ class TestAgora(TestCase):
setattr(self.agora, "markets", self.markets) setattr(self.agora, "markets", self.markets)
setattr(self.money, "markets", self.markets) setattr(self.money, "markets", self.markets)
setattr(self.agora, "money", self.money) setattr(self.agora, "money", self.money)
self.markets.sinks = MagicMock()
self.markets.sinks.currencies = [
"AUD",
"CAD",
"CHF",
"CZK",
"DKK",
"EUR",
"GBP",
"HKD",
"HUF",
"JPY",
"MXN",
"NOK",
"NZD",
"PLN",
"RUB",
"SEK",
"SGD",
"THB",
"TRY",
"USD",
"ZAR",
]
self.all_providers = [ self.all_providers = [
"XOOM", "XOOM",

View File

@ -1,4 +1,5 @@
from unittest import TestCase from unittest import TestCase
from unittest.mock import MagicMock
from tests.common import fake_public_ads, expected_to_update from tests.common import fake_public_ads, expected_to_update
from markets import Markets from markets import Markets
from sources.agora import Agora from sources.agora import Agora
@ -9,6 +10,30 @@ class TestMarkets(TestCase):
def setUp(self): def setUp(self):
self.markets = Markets() self.markets = Markets()
self.agora = Agora() self.agora = Agora()
self.markets.sinks = MagicMock()
self.markets.sinks.currencies = [
"AUD",
"CAD",
"CHF",
"CZK",
"DKK",
"EUR",
"GBP",
"HKD",
"HUF",
"JPY",
"MXN",
"NOK",
"NZD",
"PLN",
"RUB",
"SEK",
"SGD",
"THB",
"TRY",
"USD",
"ZAR",
]
def test_autoprice(self): def test_autoprice(self):
ads = [ ads = [