Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /lib/python3.6/site-packages/tracer/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.6/site-packages/tracer/tests/test_query.py
from .__meta__ import *
from tracer.query import Query, Lazy


class TestQuery(unittest.TestCase):

	def setUp(self):
		self.query = Query(tracer=TracerMock)

	def test_affected_applications(self):
		apps_query = self.query.affected_applications()
		self.assertIsInstance(apps_query, Lazy)
		self.assertTrue(hasattr(apps_query, "get"))
		self.assertListEqual(list(apps_query.get()), ["A", "B", "C"])


class TracerMock(object):
	def __init__(self, *args):
		pass

	def trace_affected(self, user=None):
		return ["A", "B", "C"]



if __name__ == '__main__':
	unittest.main()

Spamworldpro Mini