Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(images): add tests for image variations #14

Merged
merged 1 commit into from
Aug 10, 2023
Merged

feat(images): add tests for image variations #14

merged 1 commit into from
Aug 10, 2023

Conversation

ak9024
Copy link
Owner

@ak9024 ak9024 commented Aug 10, 2023

Add test cases for image variations to ensure proper functionality and error handling. This includes testing the ImagesVariations and ImagesVariationsB64JSON methods.

  1. Added TestImagesVariations function to test ImagesVariations method. Created a new configuration with empty OpenAIKey and tried to call ImagesVariations with an empty image. Asserted that an error is not nil and the response is nil. Also asserted that the expected response type is ModelImagesResponse[DataURL].

  2. Added TestImagesVariationsB64JSON function to test ImagesVariationsB64JSON method. Created a new configuration with empty OpenAIKey and tried to call ImagesVariationsB64JSON with an empty image. Asserted that an error is not nil and the response is nil. Also asserted that the expected response type is ModelImagesResponse[DataB64JSON].

feat(init): rename new.go and new_test

Add test cases for image variations to ensure proper functionality and error handling. This includes
testing the ImagesVariations and ImagesVariationsB64JSON methods.

1. Added TestImagesVariations function to test ImagesVariations method. Created a new configuration
   with empty OpenAIKey and tried to call ImagesVariations with an empty image. Asserted that an
   error is not nil and the response is nil. Also asserted that the expected response type is
   ModelImagesResponse[DataURL].

2. Added TestImagesVariationsB64JSON function to test ImagesVariationsB64JSON method. Created a new
   configuration with empty OpenAIKey and tried to call ImagesVariationsB64JSON with an empty image.
   Asserted that an error is not nil and the response is nil. Also asserted that the expected
   response type is ModelImagesResponse[DataB64JSON].

feat(init): rename new.go and new_test
@ak9024 ak9024 merged commit 44f1399 into main Aug 10, 2023
1 check passed
@ak9024 ak9024 deleted the tests branch August 10, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant