def discover_jstests test_urls jstests for pattern in get_resolver tes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
def discover_jstests(test_urls):
jstests = {}
for pattern in get_resolver(test_urls).url_patterns:
class Test(QUnitSuite, JsTestCase):
url_name = pattern.name
urls = test_urls
Test.__name__ = pattern.name.replace('-', '_')
jstests[Test.__name__] = Test
return jstests
locals().update(discover_jstests("madmin.tests.jstests.urls"))