def hits_groups_total(): """Return total number of hits groups or None""" url = "https://www.mturk.com/mturk/findhits?match=false" html = _get_html(url) return parser.hits_group_total(html)
def test_hits_group_total_wrong(self): html = '<html>bad html</html>' expected = None result = parser.hits_group_total(html) self.assertEqual(result, expected)
def hits_groups_total(): """Return total number of hits groups or None""" url = "{}/mturk/findhits?match=false".format(settings.MTURK_PAGE) html = _get_html(url) return parser.hits_group_total(html)
def test_hits_group_total(self): html = self.get_html('hitslist.html') expected = 2076 result = parser.hits_group_total(html) self.assertEqual(result, expected)