Skip to content

Commit

Permalink
Merge pull request #88 from DeepAI-Research/antbaez/fixing_issues
Browse files Browse the repository at this point in the history
fixed create instance test
  • Loading branch information
antbaez9 authored Jul 16, 2024
2 parents 05a09cf + f7dc554 commit d91d2fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion distributask/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,14 @@ def test_create_instance(mock_put):
offer_id = "offer1"
image = "test_image"
module_name = "distributask.example.worker"
command = f"celery -A {module_name} worker --loglevel=info"

mock_response = MagicMock()
mock_response.status_code = 200
mock_response.json.return_value = {"new_contract": "instance1"}
mock_put.return_value = mock_response

instance = distributask.create_instance(offer_id, image, module_name)
instance = distributask.create_instance(offer_id, image, module_name, distributask.settings, command)

assert instance["new_contract"] == "instance1"

Expand Down

0 comments on commit d91d2fb

Please sign in to comment.