def setUpClass(cls):
        print('~~~~TestMultiFactor::setUpClass~~~~')

        LR.API_KEY = env.API_KEY
        LR.API_SECRET = env.API_SECRET
        LR.LIBRARY = 'requests'
        cls.loginradius = LR()
        cls.set = setUp(cls.loginradius)
        cls.tear = tearDown(cls.loginradius)
示例#2
0
    def setUpClass(cls):
        print('~~~~TestSocial::setUpClass~~~~')

        LR.API_KEY = env.API_KEY
        LR.API_SECRET = env.API_SECRET
        LR.LIBRARY = 'requests'
        cls.loginradius = LR()
        cls.set = setUp(cls.loginradius)
        cls.tear = tearDown(cls.loginradius)
示例#3
0
    def setUpClass(cls):
        print('~~~~TestRoles::setUpClass~~~~')

        LR.API_KEY = env.API_KEY
        LR.API_SECRET = env.API_SECRET
        LR.LIBRARY = 'requests'
        cls.loginradius = LR()
        cls.set = setUp(cls.loginradius)
        cls.tear = tearDown(cls.loginradius)
        cls.role_name = 'lr-pysdk-role'
    def setUpClass(cls):
        print('~~~~TestPhoneAuthentication::setUpClass~~~~')

        LR.API_KEY = env.API_KEY
        LR.API_SECRET = env.API_SECRET
        LR.LIBRARY = 'requests'
        cls.loginradius = LR()
        cls.set = setUp(cls.loginradius)
        cls.tear = tearDown(cls.loginradius)
        cls.phoneid = env.PHONE_NUM
示例#5
0
    def setUpClass(cls):
        print('~~~~TestRoles::setUpClass~~~~')

        LR.API_KEY = env.API_KEY
        LR.API_SECRET = env.API_SECRET
        LR.LIBRARY = 'requests'
        cls.loginradius = LR()
        cls.set = setUp(cls.loginradius)
        cls.tear = tearDown(cls.loginradius)
        cls.role_name = 'lr-pysdk-role'
import test_cases

def test(names):
  runner = TextTestRunner(verbosity=2)
  loader = TestLoader()
  tests = []

  for name in names:
    test_file = getattr(test_cases, name)
    for test_case in dir(test_file):
      if test_case.startswith("Test"):
        tests += loader.loadTestsFromTestCase(getattr(test_file, test_case))

  suite = TestSuite(tuple(tests))
  runner.run(suite)


def test_all():
  test([t for t in dir(test_cases) if t[0] != "_"])


if __name__ == "__main__":
  epidb_process = helpers.setUp()
  try:
    if len(sys.argv) == 1:
      test_all()
    else:
      test(sys.argv[1:])
  finally:
    helpers.tearDown(epidb_process)