예제 #1
0
 def test_empty_mempath(self, p):
     set_cwd(tempfile.mkdtemp())
     m = Memory()
     m.memory_path = Files.temp_put("")
     assert m.run() is None
     p.error.assert_called_once()
     assert "dump empty" in p.error.call_args_list[0][0][0]
예제 #2
0
 def test_empty_mempath(self, p):
     set_cwd(tempfile.mkdtemp())
     m = Memory()
     m.memory_path = Files.temp_put("")
     assert m.run() is None
     p.error.assert_called_once()
     assert "dump empty" in p.error.call_args_list[0][0][0]
예제 #3
0
 def test_invalid_mempath(self, p):
     set_cwd(tempfile.mkdtemp())
     m = Memory()
     m.memory_path = "notafile"
     assert m.run() is None
     p.error.assert_called_once()
     assert "dump not found" in p.error.call_args_list[0][0][0]
예제 #4
0
 def test_invalid_mempath(self, p):
     set_cwd(tempfile.mkdtemp())
     m = Memory()
     m.memory_path = "notafile"
     assert m.run() is None
     p.error.assert_called_once()
     assert "dump not found" in p.error.call_args_list[0][0][0]
예제 #5
0
 def test_global_osprofile(self, p):
     set_cwd(tempfile.mkdtemp())
     cuckoo_create(cfg={
         "memory": {
             "basic": {
                 "guest_profile": "profile0",
             },
         },
     })
     filepath = Files.temp_named_put("notempty", "memory.dmp")
     m = Memory()
     m.set_path(os.path.dirname(filepath))
     m.set_machine({})
     m.run()
     p.assert_called_once_with(filepath, "profile0")