def load_tests(loader: TestLoader, tests: TestSuite, pattern: Optional[str]) -> TestSuite: from .test_equipment import TestEquipment from .test_equipment_type import TestEquipmentType from .test_link import TestLink from .test_location import TestLocation from .test_port_type import TestEquipmentPortType from .test_service import TestService from .test_service_type import TestServiceType from .test_user import TestUser from ..utils.grpc.rpc_pb2_grpc import TenantServiceStub TESTS = [ TestEquipment, TestEquipmentType, TestLink, TestLocation, TestEquipmentPortType, TestService, TestServiceType, TestUser, ] print("Waiting for symphony to be ready") wait_for_platform() print("Initializing client") client = init_client(TEST_USER_EMAIL, TEST_USER_EMAIL) print("Initializing cleaner") address = get_grpc_server_address() channel = insecure_channel(address) stub = TenantServiceStub(channel) print("Packing tests") test_suite = TestSuite() for test_class in TESTS: testCaseNames = loader.getTestCaseNames(test_class) for test_case_name in testCaseNames: test_suite.addTest(test_class(test_case_name, client, stub)) return test_suite
def load_tests(loader: TestLoader, tests: TestSuite, pattern: Optional[str]) -> TestSuite: from .test_site_survey import TestSiteSurvey from ..utils.grpc.rpc_pb2_grpc import TenantServiceStub TESTS = [TestSiteSurvey] print("Waiting for symphony to be ready") wait_for_platform() print("Initializing client") client = init_client(TEST_USER_EMAIL, TEST_USER_EMAIL) print("Initializing cleaner") address = get_grpc_server_address() channel = insecure_channel(address) stub = TenantServiceStub(channel) print("Packing tests") test_suite = TestSuite() for test_class in TESTS: testCaseNames = loader.getTestCaseNames(test_class) for test_case_name in testCaseNames: test_suite.addTest(test_class(test_case_name, client, stub)) return test_suite