Skip to content

Commit

Permalink
Rename patched module
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrodob committed Apr 7, 2015
1 parent 15816fe commit ebab58c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_web.py
Expand Up @@ -1137,12 +1137,12 @@ def test_14_delete_application(self, mock):
res = self.delete_project(short_name=Fixtures.project_short_name)
assert res.status_code == 403, res.status_code

@patch('pybossa.view.applications.uploader')
@patch('pybossa.view.projects.uploader')
def test_delete_project_deletes_task_zip_files_too(self, uploader):
"""Test WEB delete project also deletes zip files for task and taskruns"""
Fixtures.create()
self.signin(email=u'root@root.com', password=u'tester' + 'root')
res = self.app.post('/app/test-app/delete', follow_redirects=True)
res = self.app.post('/project/test-app/delete', follow_redirects=True)
expected = [call('1_test-app_task_json.zip', 'user_1'),
call('1_test-app_task_csv.zip', 'user_1'),
call('1_test-app_task_run_json.zip', 'user_1'),
Expand Down Expand Up @@ -3232,12 +3232,12 @@ def test_56_delete_tasks(self):
err_msg = "Admin should get 200 in POST"
assert res.status_code == 200, err_msg

@patch('pybossa.view.applications.uploader')
@patch('pybossa.view.projects.uploader')
def test_delete_tasks_removes_existing_zip_files(self, uploader):
"""Test WEB delete tasks also deletes zip files for task and taskruns"""
Fixtures.create()
self.signin(email=u'root@root.com', password=u'tester' + 'root')
res = self.app.post('/app/test-app/tasks/delete', follow_redirects=True)
res = self.app.post('/project/test-app/tasks/delete', follow_redirects=True)
expected = [call('1_test-app_task_json.zip', 'user_1'),
call('1_test-app_task_csv.zip', 'user_1'),
call('1_test-app_task_run_json.zip', 'user_1'),
Expand Down

0 comments on commit ebab58c

Please sign in to comment.