Exemplo n.º 1
0
def test_currency_history__with_not_exists_currency():
    with pytest.raises(CurrenciesDALException):
        CurrenciesDAL.get_currency_history(2)
Exemplo n.º 2
0
 def get(self, currency_id: str):  # type: ignore
     try:
         currency_id_in_int: int = validate_path_parameter(currency_id)
         return CurrenciesDAL.get_currency_history(currency_id_in_int)
     except (ValidationException, CurrenciesDALException) as e:
         abort(HTTPStatus.BAD_REQUEST, e)
Exemplo n.º 3
0
def test_currency_history_after_adding_currency(currency_params):
    actual: List[AbstractSerialize] = CurrenciesDAL.get_currency_history(1)
    assert len(actual) == 1
    assert actual[0].selling_price == currency_params[1]
    assert actual[0].purchasing_price == currency_params[2]