示例#1
0
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)
示例#2
0
 def test_hits_group_total_wrong(self):
     html = '<html>bad html</html>'
     expected = None
     result = parser.hits_group_total(html)
     self.assertEqual(result, expected)
示例#3
0
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)
示例#4
0
 def test_hits_group_total(self):
     html = self.get_html('hitslist.html')
     expected = 2076
     result = parser.hits_group_total(html)
     self.assertEqual(result, expected)
示例#5
0
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)