1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 06:18:08 +00:00

Add a test for \r\n

Fix #458
This commit is contained in:
Julien Duponchelle 2016-03-21 16:53:11 +01:00
parent 975e1c8fa7
commit dcc4ddf11b
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -118,6 +118,7 @@ def test_start(loop, vm, monkeypatch):
assert vm.is_running()
assert vm.command_line == ' '.join(mock_exec.call_args[0])
def test_start_with_iourc(loop, vm, monkeypatch, tmpdir):
fake_file = str(tmpdir / "iourc")
@ -412,6 +413,14 @@ def test_iourc_content(vm):
assert f.read() == "test"
def test_iourc_content_fix_carriage_return(vm):
vm.iourc_content = "test\r\n12"
with open(os.path.join(vm.temporary_directory, "iourc")) as f:
assert f.read() == "test\n12"
def test_extract_configs(vm):
assert vm.extract_configs() == (None, None)