Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmerza committed Jan 15, 2024
1 parent b8625c1 commit 0c1f812
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,8 @@ def test_get_snapshot_successful(self, mock_logger, mock_requests_get):
frigate_event_id = 'event123'
frigate_url = 'http://example.com'

# Call the function
result = index.get_snapshot(frigate_event_id, frigate_url)

# Assertions
self.assertEqual(result, b'image_data')
mock_requests_get.assert_called_with(f"{frigate_url}/api/events/{frigate_event_id}/snapshot.jpg",
params={"crop": 1, "quality": 95})
Expand All @@ -373,10 +371,8 @@ def test_get_snapshot_failure(self, mock_logger, mock_requests_get):
frigate_event_id = 'event123'
frigate_url = 'http://example.com'

# Call the function
result = index.get_snapshot(frigate_event_id, frigate_url)

# Assertions
self.assertIsNone(result)
mock_requests_get.assert_called_with(f"{frigate_url}/api/events/{frigate_event_id}/snapshot.jpg",
params={"crop": 1, "quality": 95})
Expand Down

0 comments on commit 0c1f812

Please sign in to comment.