mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Merge pull request #805 from alphagov/fix-duplicate-test
Fix duplicate test name
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# run a single unit test, pass in the unit test name for example: tests/app/service/test_rest.py::test_get_template_list
|
# run a single unit test, pass in the unit test name for example: tests/app/service/test_rest.py::test_get_template_list
|
||||||
source environment_test.sh
|
source environment_test.sh
|
||||||
py.test -s $@
|
py.test $@
|
||||||
|
|||||||
@@ -36,14 +36,13 @@ def test_should_have_decorated_tasks_functions():
|
|||||||
assert send_daily_performance_stats.__wrapped__.__name__ == 'send_daily_performance_stats'
|
assert send_daily_performance_stats.__wrapped__.__name__ == 'send_daily_performance_stats'
|
||||||
|
|
||||||
|
|
||||||
def test_should_call_delete_notifications_more_than_week_in_task(notify_api, mocker):
|
def test_should_call_delete_successful_notifications_more_than_week_in_task(notify_api, mocker):
|
||||||
mocked = mocker.patch('app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago')
|
mocked = mocker.patch('app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago')
|
||||||
delete_successful_notifications()
|
delete_successful_notifications()
|
||||||
assert mocked.assert_called_with('delivered')
|
mocked.assert_called_once_with('delivered')
|
||||||
assert scheduled_tasks.delete_notifications_created_more_than_a_week_ago.call_count == 1
|
|
||||||
|
|
||||||
|
|
||||||
def test_should_call_delete_notifications_more_than_week_in_task(notify_api, mocker):
|
def test_should_call_delete_failed_notifications_more_than_week_in_task(notify_api, mocker):
|
||||||
mocker.patch('app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago')
|
mocker.patch('app.celery.scheduled_tasks.delete_notifications_created_more_than_a_week_ago')
|
||||||
delete_failed_notifications()
|
delete_failed_notifications()
|
||||||
assert scheduled_tasks.delete_notifications_created_more_than_a_week_ago.call_count == 4
|
assert scheduled_tasks.delete_notifications_created_more_than_a_week_ago.call_count == 4
|
||||||
|
|||||||
Reference in New Issue
Block a user