dosage/tests/test_vote.py

25 lines
589 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2016-10-28 22:21:41 +00:00
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2017 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
import responses
2013-04-09 17:33:50 +00:00
from dosagelib import scraper
import httpmocks
2013-04-09 17:33:50 +00:00
class ATestScraper(scraper._BasicScraper):
pass
2013-04-09 17:33:50 +00:00
class TestVote(object):
2013-04-09 17:33:50 +00:00
@responses.activate
2013-04-09 17:33:50 +00:00
def test_vote(self):
httpmocks.vote()
answer = ATestScraper('Test_Test').vote()
assert answer in ('counted', 'no'), 'invalid answer %r' % answer