add test case for options

This commit is contained in:
Freddy Tan 2016-12-21 00:43:44 +08:00
parent f1e0ce62ed
commit 839b30d72a

View file

@ -79,6 +79,20 @@ class TestTerraform(object):
assert expected_output in out.replace('\n', '').replace(' ', '')
assert err == ''
@pytest.mark.parametrize(
['cmd', 'args', 'options'],
[
# bool value
('fmt', ['bad_fmt'], {'list': False, 'diff': False})
]
)
def test_options(self, cmd, args, options):
tf = Terraform(working_dir=current_path)
ret, out, err = getattr(tf, cmd)(*args, **options)
assert ret == 0
assert out == ''
# todo revert the test file
def test_state_data(self):
cwd = os.path.join(current_path, 'test_tfstate_file')