Binance: Fix UpdateOrderExecutionLimits margin test (#1464)

Calls for limits for margin asset were not doing anything if spot is
enabled.
This caused intermittent failures when the sequence of tests meant
margin was tested before spot, since the limits wouldn't be loaded.

But it also highlighted that API users calling Update Limits for margin
outside the context of a loop on all assets would not get an update.
Also intermittently when the loop of UpdateLimits on assets puts margin first
This commit is contained in:
Gareth Kirwan
2024-02-12 08:03:11 +01:00
committed by GitHub
parent 58caf2c637
commit 9ff502bac2
5 changed files with 99 additions and 140 deletions

View File

@@ -204,7 +204,7 @@ func TestWrapperGetServerTime(t *testing.T) {
t.Parallel()
st, err := b.GetServerTime(context.Background(), asset.Spot)
assert.NoError(t, err, "GetServerTime should not error")
assert.WithinRange(t, st, time.Now().Add(-24*time.Hour), time.Now().Add(24*time.Hour), "Time should be within a day of what now")
assert.WithinRange(t, st, time.Now().Add(-24*time.Hour), time.Now().Add(24*time.Hour), "Time should be within a day of now")
}
func TestGetWalletInformation(t *testing.T) {