dosage/tests/test_vote.py
Tobias Gruetzmacher d88f6aeee3 Replace online tests with mocks.
We want to test our code, not the comic modules.
2017-10-15 14:54:44 +02:00

25 lines
589 B
Python

# -*- coding: utf-8 -*-
# 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
from dosagelib import scraper
import httpmocks
class ATestScraper(scraper._BasicScraper):
pass
class TestVote(object):
@responses.activate
def test_vote(self):
httpmocks.vote()
answer = ATestScraper('Test_Test').vote()
assert answer in ('counted', 'no'), 'invalid answer %r' % answer