Skip to content

Commit

Permalink
fix test path to work on windows environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan Spitz authored and jbremer committed Jul 13, 2017
1 parent d14a5a7 commit e6c3852
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See the file 'docs/LICENSE' for copying permission.

import mock
import os
import pytest
import tempfile

Expand Down Expand Up @@ -43,8 +44,10 @@ class named_machine(object):
self.m.start("label", None)

e.match("no attribute 'qemu_img'")
os_path_exists.assert_called_with("/home/cuckoo/images/snapshot_ubuntu32.qcow2")
os_remove.assert_called_with("/home/cuckoo/images/snapshot_ubuntu32.qcow2")

snapshot_path = os.path.join("/home/cuckoo/images", "snapshot_ubuntu32.qcow2")
os_path_exists.assert_called_with(snapshot_path)
os_remove.assert_called_with(snapshot_path)

@mock.patch("cuckoo.machinery.qemu.subprocess.Popen")
def test_snapshot_config(self, subprocess_popen):
Expand Down

0 comments on commit e6c3852

Please sign in to comment.