def test_valid(self): self.assertEqual( [(datetime.datetime(2017, 1, 23, 0, 45, 15, tzinfo=UTC), Decimal('1.330115')), (datetime.datetime(2017, 1, 23, 0, 45, 20, tzinfo=UTC), Decimal('1.330065'))], oanda._fetch_candles({}))
def test_key_error(self): self.assertIs(None, oanda._fetch_candles({}))
def test_null_response(self): self.assertIs(None, oanda._fetch_candles({}))