def test_url_end_dates_year_only(self): test = ipea.get_serie("BM12_CRLIN12", end="2019") expected = ( BASEURL + "&$filter=VALDATA ge 1900-01-01T00:00:00-00:00 and VALDATA le 2019-12-31T00:00:00-00:00" # noqa: W503 ) self.assertEqual(test, expected)
def test_url_start_dates_month_year(self): test = ipea.get_serie("BM12_CRLIN12", start="02/2019") expected = ( BASEURL + "&$filter=VALDATA ge 2019-02-01T00:00:00-00:00 and VALDATA le 2019-12-02T00:00:00-00:00" # noqa: W503 ) self.assertEqual(test, expected)
def test_url_end_dates_complete_dates(self): test = ipea.get_serie("BM12_CRLIN12", end="01022019") expected = ( BASEURL + "&$filter=VALDATA ge 1900-01-01T00:00:00-00:00 and VALDATA le 2019-02-01T00:00:00-00:00" # noqa: W503 ) self.assertEqual(test, expected)
def test_url_no_dates(self): test = ipea.get_serie("BM12_CRLIN12") expected = ( BASEURL + "&$filter=VALDATA ge 1900-01-01T00:00:00-00:00 and VALDATA le 2019-12-02T00:00:00-00:00" # noqa: W503 ) self.assertEqual(test, expected)