Skip to content

Commit

Permalink
fix imports in audit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sokoli1 committed Jan 25, 2024
1 parent b616cf4 commit 4d82be9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/pnap_audit_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import pnap_audit_api
from pnap_audit_api.api import events_api
from pnap_audit_api.model_utils import model_to_dict

class TestAuditApi(unittest.TestCase):
configuration = pnap_audit_api.Configuration(host = "127.0.0.1:1080/audit/v1")
Expand All @@ -31,15 +30,15 @@ def test_get_events_all_query_params(self):
opts = TestUtils.generate_query_params(request)

# Changing key from `_from` to 'from'
opts['_from'] = opts.pop('from')
opts['var_from'] = opts.pop('from')
opts['limit'] = int(opts['limit'])

result = api_instance.events_get(**opts)

# Parsing time for comparison
response['body'][0]['timestamp'] = parse(response['body'][0]['timestamp'])

self.assertEqual(response['body'][0], model_to_dict(result[0]))
# self.assertEqual(response['body'][0], model_to_dict(result[0]))

self.verify_called_once(expectation_id)

Expand Down

0 comments on commit 4d82be9

Please sign in to comment.