mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +00:00
Tests: Use currency.NewBTCUSD and NewBTCUSDT (#1895)
* Tests: Use currency.NewUSD and NewUSDT Simple refactor to use the provided shortcut methods * Github: Add CI check to ensure NewPair not used Add a step to ensure NewPair(BTC, USD*) isn't used
This commit is contained in:
@@ -16,7 +16,7 @@ const testExchange = "binance"
|
||||
func TestLoadDataCandles(t *testing.T) {
|
||||
exch := testExchange
|
||||
a := asset.Spot
|
||||
p := currency.NewPair(currency.BTC, currency.USDT)
|
||||
p := currency.NewBTCUSDT()
|
||||
_, err := LoadData(
|
||||
common.DataCandle,
|
||||
filepath.Join("..", "..", "..", "..", "testdata", "binance_BTCUSDT_24h_2019_01_01_2020_01_01.csv"),
|
||||
@@ -33,7 +33,7 @@ func TestLoadDataCandles(t *testing.T) {
|
||||
func TestLoadDataTrades(t *testing.T) {
|
||||
exch := testExchange
|
||||
a := asset.Spot
|
||||
p := currency.NewPair(currency.BTC, currency.USDT)
|
||||
p := currency.NewBTCUSDT()
|
||||
_, err := LoadData(
|
||||
common.DataTrade,
|
||||
filepath.Join("..", "..", "..", "..", "testdata", "binance_BTCUSDT_24h-trades_2020_11_16.csv"),
|
||||
@@ -50,7 +50,7 @@ func TestLoadDataTrades(t *testing.T) {
|
||||
func TestLoadDataInvalid(t *testing.T) {
|
||||
exch := testExchange
|
||||
a := asset.Spot
|
||||
p := currency.NewPair(currency.BTC, currency.USDT)
|
||||
p := currency.NewBTCUSDT()
|
||||
_, err := LoadData(
|
||||
-1,
|
||||
filepath.Join("..", "..", "..", "..", "testdata", "binance_BTCUSDT_24h-trades_2020_11_16.csv"),
|
||||
|
||||
Reference in New Issue
Block a user