Skip to content

Commit

Permalink
Corrected integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jodendaal committed Nov 10, 2023
1 parent 085238e commit f035c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OpenAI.Net.Integration.Tests/ImageService_Variation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task Variation_Base64ToFileContent(bool isSuccess, HttpStatusCode s
o.Size = "256x256";
o.ResponseFormat = ImageResponseFormat.Base64;
o.Style = ImageStyleOptions.Vivid;
o.Quality = ImageQualityOptions.HighDefinition;
o.Quality = ImageQualityOptions.Standard;
o.Model = ImageModelOptions.Dalle2;
});

Expand All @@ -47,7 +47,7 @@ public async Task Variation_Base64ToFileContent(bool isSuccess, HttpStatusCode s
Assert.That(response.StatusCode, Is.EqualTo(statusCode));
Assert.That(response.Result?.Data?.Count() == 1, Is.EqualTo(isSuccess), "Data is not mapped correctly");
Assert.That(response.Result?.Data?[0].Url?.Contains("https://"), isSuccess ? Is.EqualTo(isSuccess) : Is.EqualTo(null), "Choice text not set");
Assert.That(response.ErrorResponse?.Error?.Message?.Contains("is not one of ['256x256', '512x512', '1024x1024']"), isSuccess ? Is.EqualTo(null) : Is.EqualTo(true), "Error message not returned");
Assert.That(response.ErrorResponse?.Error?.Message, isSuccess ? Is.EqualTo(null) : Contains.Substring("is not one of ['256x256', '512x512', '1024x1024']"), "Error message not returned");
}

[TestCase(true, HttpStatusCode.OK, "256x256", TestName = "Variation_FileInfoFileContent_When_Success")]
Expand Down

0 comments on commit f035c9d

Please sign in to comment.