| 1 |
import unittest |
| 2 |
import tempfile |
| 3 |
import shutil |
| 4 |
from droidlysis3 import process_file |
| 5 |
from droidconfig import generalconfig |
| 6 |
|
| 7 |
class DroidLysisTest(unittest.TestCase): |
| 8 |
def setUp(self): |
| 9 |
# Create a temporary directory |
| 10 |
self.test_dir = tempfile.mkdtemp() |
| 11 |
|
| 12 |
def tearDown(self): |
| 13 |
# Remove the directory after the test |
| 14 |
shutil.rmtree(self.test_dir) |
| 15 |
|
| 16 |
def test_process_file(self): |
| 17 |
config = generalconfig(filename='../conf/general.conf', verbose=False) |
| 18 |
process_file(config=config, |
| 19 |
infile='./apk/ph0wn-musicalear.apk', |
| 20 |
outdir=self.test_dir) |
| 21 |
|
| 22 |
|
| 23 |
if __name__ == '__main__': |
| 24 |
unittest.main() |