mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
fix testcases
This commit is contained in:
parent
5fed7b81de
commit
288f7257eb
|
@ -208,6 +208,11 @@ func (e Exchange) QueryTrades(ctx context.Context, symbol string, options *types
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func (e Exchange) QueryTickers(ctx context.Context, symbol ...string) (map[string]types.Ticker, error) {
|
||||
// Not using Tickers in back test (yet)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (e Exchange) Name() types.ExchangeName {
|
||||
return e.publicExchange.Name()
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package binance
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -28,7 +27,6 @@ func TestSomeSymbols(t *testing.T) {
|
|||
}
|
||||
|
||||
if len(got) != 2 {
|
||||
fmt.Println(got)
|
||||
t.Errorf("Binance Exchange: Attempting to get two symbols, but number of tickers do not match")
|
||||
|
||||
}
|
||||
|
@ -42,7 +40,6 @@ func TestSingleSymbol(t *testing.T) {
|
|||
}
|
||||
|
||||
if len(got) != 1 {
|
||||
fmt.Println(got)
|
||||
t.Errorf("Binance Exchange: Attempting to get one symbol, but number of tickers do not match")
|
||||
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ func (e *Exchange) QueryTickers(ctx context.Context, symbol ...string) (map[stri
|
|||
}
|
||||
|
||||
for k, v := range tickers {
|
||||
if _, ok := m[strings.ToUpper(k)]; !ok {
|
||||
if _, ok := m[strings.ToUpper(k)]; len(symbol) != 0 && !ok {
|
||||
continue
|
||||
}
|
||||
ret[strings.ToUpper(k)] = types.Ticker{
|
||||
|
|
|
@ -2,7 +2,6 @@ package max
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -27,7 +26,6 @@ func TestSomeSymbols(t *testing.T) {
|
|||
}
|
||||
|
||||
if len(got) != 2 {
|
||||
fmt.Println(got)
|
||||
t.Errorf("Max Exchange: Attempting to get two symbols, but number of tickers do not match")
|
||||
|
||||
}
|
||||
|
@ -41,7 +39,6 @@ func TestSingleSymbol(t *testing.T) {
|
|||
}
|
||||
|
||||
if len(got) != 1 {
|
||||
fmt.Println(got)
|
||||
t.Errorf("Max Exchange: Attempting to get one symbol, but number of tickers do not match")
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user