Add tests (#171)
* test models listing * remove non-needed method * test for .streamFinished * add more error tests * improve stream testing * fix typo
This commit is contained in:
@@ -93,6 +93,11 @@ func TestCreateCompletionStream(t *testing.T) {
|
||||
if !errors.Is(streamErr, io.EOF) {
|
||||
t.Errorf("stream.Recv() did not return EOF in the end: %v", streamErr)
|
||||
}
|
||||
|
||||
_, streamErr = stream.Recv()
|
||||
if !errors.Is(streamErr, io.EOF) {
|
||||
t.Errorf("stream.Recv() did not return EOF when the stream is finished: %v", streamErr)
|
||||
}
|
||||
}
|
||||
|
||||
// A "tokenRoundTripper" is a struct that implements the RoundTripper
|
||||
|
||||
Reference in New Issue
Block a user