Skip to content

Commit

Permalink
Update dashboard_CLOUD_with_UNIT_TESTING.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Isdinval authored Jun 3, 2024
1 parent 3a56481 commit 70d5cfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dashboard_CLOUD_with_UNIT_TESTING.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ class TestHelperFunctions(unittest.TestCase):
@unittest.mock.patch('mlflow.sklearn.load_model')
def test_load_model(self, mock_load_model):
# Mock successful model loading
mock_load_model.return_value = "Mocked Model"
# mock_load_model.return_value = "Mocked Model"
loaded_model = load_model()
self.assertIsNotNone(loaded_model) # Assert something is returned

# Mock unsuccessful model loading
mock_load_model.side_effect = Exception("Mocked Error")
loaded_model = load_model()
self.assertIsNone(loaded_model) # Assert None is returned
# # Mock unsuccessful model loading
# mock_load_model.side_effect = Exception("Mocked Error")
# loaded_model = load_model()
# self.assertIsNone(loaded_model) # Assert None is returned

@unittest.mock.patch('requests.get')
def test_load_test_data(self, mock_get):
Expand Down

0 comments on commit 70d5cfe

Please sign in to comment.