Beispiel #1
0
 def test_get_executable_first(self):
     obj = {"executable": [1, 2, 3]}
     result = loader.format_command(obj)
     assert result == ["executable", 1, 2, 3]
Beispiel #2
0
 def test_no_obj(self):
     with raises(InvalidFormat):
         loader.format_command({})
Beispiel #3
0
 def test_raise_invalid_format(self):
     with raises(InvalidFormat):
         loader.format_command([])
Beispiel #4
0
 def test_get_correct_rpr(self):
     with raises(InvalidFormat) as exc:
         loader.format_command([])
     error = exc.value.args[0]
     assert "received: []" in error
Beispiel #5
0
 def test_no_arguments_are_ok(self):
     obj = {"executable": []}
     result = loader.format_command(obj)
     assert result == ["executable"]