Skip to content

Commit

Permalink
Fix test when using locale middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
willbarton committed Apr 24, 2017
1 parent 0a2dda8 commit cc151cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions paying_for_college/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ def test_feedback(self):
self.assertTrue(sorted(response.context_data.keys()) ==
['base_template', 'form', 'url_root'])

@mock.patch('paying_for_college.views.render_to_response')
def test_feedback_post(self, mock_render):
client.post(
@mock.patch('paying_for_college.views.Feedback')
def test_feedback_post(self, mock_feedback):
response = client.post(
reverse('disclosures:pfc-feedback'),
data=self.feedback_post_data)
self.assertTrue(mock_render.call_count == 1)
self.assertEqual(response.status_code, 200)
self.assertTrue(mock_feedback.call_count == 1)

def test_feedback_post_invalid(self):
response = client.post(reverse('disclosures:pfc-feedback'))
Expand Down

0 comments on commit cc151cf

Please sign in to comment.