-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 72c3e29.
- Loading branch information
1 parent
17bb835
commit 68e8c21
Showing
3 changed files
with
8 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ def test_expense_group_view(api_client, test_connection): | |
|
||
api_client.credentials(HTTP_AUTHORIZATION='Bearer {}'.format(access_token)) | ||
|
||
response = api_client.get(url, {'exported_at__gte': '2022-05-23T13:03:06Z', 'exported_at__lte': '2022-05-23T13:03:48Z'}) | ||
response = api_client.get(url, {'exported_at__gte': '2022-05-23 13:03:06', 'exported_at__lte': '2022-05-23 13:03:48'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
|
@@ -26,58 +26,6 @@ def test_expense_group_view(api_client, test_connection): | |
TaskLog.objects.update_or_create(workspace_id=3, type='FETCHING_EXPENSES', defaults={'status': 'IN_PROGRESS'}) | ||
|
||
|
||
def test_export_log_advanced_search(api_client, test_connection): | ||
access_token = test_connection.access_token | ||
|
||
url = reverse('expense-groups', kwargs={'workspace_id': 3}) | ||
|
||
api_client.credentials(HTTP_AUTHORIZATION='Bearer {}'.format(access_token)) | ||
|
||
response = api_client.get(url,{'tasklog__status':'COMPLETE'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 17 | ||
|
||
response = api_client.get(url, {'expenses__expense_number': 'E/2021/04/T/277'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 1 | ||
|
||
response = api_client.get(url, {'expenses__expense_number': 'E/2021/04/T/'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 11 | ||
|
||
response = api_client.get(url, {'expenses__claim_number': 'C/2021/04/R/38'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 4 | ||
|
||
response = api_client.get(url, {'expenses__employee_email': '[email protected]'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 4 | ||
|
||
response = api_client.get(url, {'expenses__employee_name': 'Joanna'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 5 | ||
|
||
response = api_client.get(url, {'tasklog__status':'COMPLETE', 'expenses__employee_name': 'Joanna', 'expenses__employee_email': '[email protected]'}) | ||
assert response.status_code == 200 | ||
|
||
response = json.loads(response.content) | ||
assert response['count'] == 9 | ||
|
||
TaskLog.objects.update_or_create(workspace_id=3, type='FETCHING_EXPENSES', defaults={'status': 'IN_PROGRESS'}) | ||
|
||
|
||
def test_expense_group_settings(api_client, test_connection): | ||
access_token = test_connection.access_token | ||
|
||
|