Change config validator tests to use the shared fixtures
This commit is contained in:
parent
7debd44b54
commit
cb3695a629
17 changed files with 59 additions and 117 deletions
|
@ -5,11 +5,13 @@ from httmock import urlmatch, HTTMock
|
|||
from util.config.validators import ConfigValidationException
|
||||
from util.config.validators.validate_torrent import BittorrentValidator
|
||||
|
||||
from test.fixtures import *
|
||||
|
||||
@pytest.mark.parametrize('unvalidated_config,expected', [
|
||||
({}, ConfigValidationException),
|
||||
({'BITTORRENT_ANNOUNCE_URL': 'http://faketorrent/announce'}, None),
|
||||
])
|
||||
def test_validate_torrent(unvalidated_config,expected):
|
||||
def test_validate_torrent(unvalidated_config, expected, app):
|
||||
announcer_hit = [False]
|
||||
|
||||
@urlmatch(netloc=r'faketorrent', path='/announce')
|
||||
|
|
Reference in a new issue