def test_capability_provider_from_string(): test_file = 'minimal.yaml' checker, expected_exception, expected_exception_regex = test_files_map[test_file] test_file_path = os.path.join(test_data_dir, test_file) with open(test_file_path, 'r') as f: with assert_raises_regex(expected_exception, expected_exception_regex): cp = provider.capability_provider_from_string(f.read()) checker(cp)
def test_capability_provider_from_string(): test_file = 'minimal.yaml' checker, expected_exception, expected_exception_regex = test_files_map[ test_file] test_file_path = os.path.join(test_data_dir, test_file) with open(test_file_path, 'r') as f: with assert_raises_regex(expected_exception, expected_exception_regex): cp = provider.capability_provider_from_string(f.read()) checker(cp)
def capability_provider_loader(raw, package_name, spec_index): provider = capability_provider_from_string(raw) spec_index.add_provider(provider, 'service call', package_name)
def capability_provider_loader(raw, package_name, spec_index): provider = capability_provider_from_string(raw) spec_index.add_provider(provider, 'service call', package_name)