Skip to content

Commit

Permalink
Updating test
Browse files Browse the repository at this point in the history
  • Loading branch information
bannsec committed May 6, 2020
1 parent a701436 commit de6a135
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
14 changes: 6 additions & 8 deletions tests/android/test_android_common.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@

import logging
import os

from revenge import common, devices

logging.basicConfig(level=logging.DEBUG)

import os

here = os.path.dirname(os.path.abspath(__file__))
bin_location = os.path.join(here, "bins")

from revenge import Process, types, common, devices
android = devices.AndroidDevice(type="usb")
android._wait_for_frida_server()


def test_spawn():

p = android.spawn("com.android.email", gated=False, load_symbols=[])

# First time is returned as in-memory io
f = common.load_file(p, '/system/lib64/libssl.so')
assert not hasattr(f, "name")

# Second time is returned as io from file cache
# File should always be opened as a local cached version
f = common.load_file(p, '/system/lib64/libssl.so')
assert hasattr(f, "name")
assert f.name.startswith("/tmp/")
Expand Down
1 change: 0 additions & 1 deletion tests/linux/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

types = revenge.types


here = os.path.dirname(os.path.abspath(__file__))
bin_location = os.path.join(here, "bins")

Expand Down

0 comments on commit de6a135

Please sign in to comment.