Skip to content

Commit

Permalink
Merge pull request #667 from fomars/develop
Browse files Browse the repository at this point in the history
test pandora remote ammo
  • Loading branch information
fomars committed Nov 6, 2018
2 parents 03055ca + 324b293 commit bdb2d7f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions yandextank/plugins/Pandora/tests/test_pandora_plugin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import pytest

from yandextank.plugins.Pandora import Plugin


@pytest.mark.parametrize('cfg, expected', [
(
{'pools': [
{
'ammo': {'uri-headers': '[User-Agent: Wget/1.13.4 (linux-gnu)] [Host: foo.ru] [Accept-Encoding: gzip,deflate,sdch]',
'type': 'uri',
'file': 'https://raw.githubusercontent.com/yandex/yandex-tank/develop/README.md'
}
}]},
{'pools': [
{
'ammo': {'uri-headers': '[User-Agent: Wget/1.13.4 (linux-gnu)] [Host: foo.ru] [Accept-Encoding: gzip,deflate,sdch]',
'type': 'uri',
'file': 'some local file'}
}]}
)
])
def test_patch_config(cfg, expected):
plugin = Plugin(None, None)
# '/tmp/9b73d966bcbf27467d4c4190cfe58c2a.downloaded_resource'
filename = plugin.patch_config(cfg)['pools'][0]['ammo']['file']
assert filename.endswith('.downloaded_resource')

0 comments on commit bdb2d7f

Please sign in to comment.