Skip to content

Commit

Permalink
resolve: added unit-test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rolin999 committed Nov 20, 2024
1 parent a3d808c commit a5608be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/bk-user/tests/apis/web/audit/test_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,15 @@ def test_audit_record_list_pagination_second_page(self, api_client, audit_record

assert resp.status_code == status.HTTP_200_OK
assert len(resp.data) == 2

def test_audit_record_list_pagination_third_page(self, api_client, audit_records):
resp = api_client.get(reverse("audit.list"), data={"page": 3, "page_size": 2})

assert resp.status_code == status.HTTP_200_OK
assert len(resp.data) == 0

def test_audit_record_list_pagination_large_page(self, api_client, audit_records):
resp = api_client.get(reverse("audit.list"), data={"page": 100, "page_size": 2})

assert resp.status_code == status.HTTP_200_OK
assert len(resp.data) == 0

0 comments on commit a5608be

Please sign in to comment.