Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
flomotlik committed Sep 27, 2017
1 parent de9d37b commit 84bb652
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions formica/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def mandatory(a):

def resource(name):
if name is None:
return ''
return ''
else:
return ''.join(e for e in name.title() if e.isalnum())
return ''.join(e for e in name.title() if e.isalnum())


class Loader(object):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def test_mandatory_filter_throws_exception_in_module(load, tmpdir):
with open('test.template.json', 'w') as f:
f.write('{"Modules": [{"path": "moduledir", "vars": {"test": {{ test }} }}]}')
with pytest.raises(SystemExit):
load.load()
load.load()


def test_wrong_key_throws_exception(load, tmpdir):
example = '{"SomeKey": "test"}'
Expand Down

0 comments on commit 84bb652

Please sign in to comment.