Skip to content

Commit

Permalink
Tweak doc test case
Browse files Browse the repository at this point in the history
This test can not distinguish if link is incorrect or serializer
exploration failed, so adjust the test accordingly.
  • Loading branch information
lubomir committed Aug 21, 2015
1 parent 591f79f commit 4748c71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pdc/apps/common/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,11 @@ def test_filter_set_has_details(self):
)


class AutoUrlsTestCase(APITestCase):
def test_no_autolink_logs_error(self):
class AutoDocTestCase(APITestCase):
def test_no_page_logs_error(self):
root = self.client.get(reverse('api-root'))
for _, url in root.data.iteritems():
with mock.patch('logging.getLogger') as getLogger:
self.client.get(url, HTTP_ACCEPT='text/html')
self.assertFalse(getLogger.return_value.error.called, "%s has bad link" % url)
self.assertFalse(getLogger.return_value.error.called,
"%s has bad documentation" % url)

0 comments on commit 4748c71

Please sign in to comment.