Skip to content

Instantly share code, notes, and snippets.

@jtomasek
Created December 17, 2013 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtomasek/8004657 to your computer and use it in GitHub Desktop.
Save jtomasek/8004657 to your computer and use it in GitHub Desktop.
def test_index_nodes_list_exception(self):
with patch.object(tuskar.BaremetalNode, 'list') as mock_method:
mock_method.side_effect = self.exceptions.tuskar
res = self.client.get(INDEX_URL)
self.assertEqual(mock_method.call_count, 1)
self.assertRedirectsNoFollow(res, RESOURCES_OVERVIEW_URL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment