Skip to content

Commit

Permalink
fix generate test
Browse files Browse the repository at this point in the history
  • Loading branch information
kalsky committed Oct 4, 2024
1 parent 6fa6d86 commit bcca145
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_utilities/test_driver_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def test_driver_generated_successfully(self):
)

with patch(
"shellfoundry.utilities.driver_generator.PackagingRestApiClient"
"shellfoundry.utilities.driver_generator.PackagingRestApiClient.login"
) as mock_rest:
rest_client_mock = MagicMock()
rest_client_mock.token = "TEST-TOKEN"
rest_client_mock._token = "TEST-TOKEN"
mock_rest.return_value = rest_client_mock

with patch("shellfoundry.utilities.driver_generator.post") as post_mock:
Expand All @@ -69,6 +69,7 @@ def test_driver_generated_successfully(self):

# Assert
assertFileExists(self, "nut-shell/src/data_model.py")
self.assertEqual(post_mock.call_args[1]["headers"]["Authorization"], "Basic TEST-TOKEN")

def test_error_displayed_when_driver_generation_returns_error_code(self):
self.fs.create_file("nut-shell/dist/NutShell.zip", contents="ZIP")
Expand Down

0 comments on commit bcca145

Please sign in to comment.