Skip to content
Snippets Groups Projects
Commit 7ff2d0c1 authored by ulif's avatar ulif
Browse files

pep8.

parent 37b21f14
No related branches found
No related tags found
No related merge requests found
......@@ -150,12 +150,15 @@ class TestHandleOptions(object):
def test_handle_options_allows_plugins_updating(self, monkeypatch):
# we allow plugins to update our argparser, before being used
import diceware
class FakePlugin(object):
@classmethod
def update_argparser(cls, parser):
parser.add_argument('--foo', default=2, type=int)
return parser
monkeypatch.setattr(diceware, 'get_random_sources', lambda: dict(foo=FakePlugin))
monkeypatch.setattr(
diceware, 'get_random_sources', lambda: dict(foo=FakePlugin))
options = handle_options([])
assert options.foo == 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment