Skip to content

Commit

Permalink
Test error on missing key
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier committed Feb 1, 2024
1 parent 00c02b2 commit ffded16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def test_api_key_from_env(self):
)
self.assertTrue("got 'Bearer WHATEVER'" in str(mc.exception))

def test_api_key_missing(self):
with self.assertRaises(ValueError) as mc:
client = Client()
self.assertEqual(str(mc.exception), "api_key is required")

def test_create_one_task_pickle(self):
results = self.client.create_tasks(
[TaskInput(coroutine_uri="my-cool-coroutine", input=42)]
Expand Down

0 comments on commit ffded16

Please sign in to comment.