-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cannot perform unittest without valid key #10
Comments
Hi! Yes, tests are currently run live via the Anthropic API. While I'm open to mocking, this is not currently considered a bug. Can you get yourself an Anthropic API key here, and then add Definitely want to automate this with GitHub Actions in the future. |
I have already set up an account and used valid generated I'll will try to mock that return value so that testing will be independent of valid api_key. |
Ah, I see! I think a graceful way to handle this would be to keep the existing functions as-is and add new ones with mocked outputs. Proposal:
|
Yes if you want to keep test on live API responses it can be done this way. We can also have 2 test files, one for live testing and the other for local and run them independently (but this only assuming that in future all test will be still kept in one-file format). Choice is up to you. |
Yup! Let's keep it all in |
While I wanted to perform tests I did encounter this error on 12 from 16 test cases:
Test could not be performed without Claude account with resources on it. I think that for general testing purposes we will need to mock Anthropic
client.messages.create
.The text was updated successfully, but these errors were encountered: