code stringlengths 3 6.57k |
|---|
AsciiDocAPI() |
self.settings.get('ASCIIDOC_OPTIONS', []) |
ad.options(*o.split() |
self.settings.get('ASCIIDOC_BACKEND', self.default_backend) |
ad.execute(text, content, backend=backend) |
content.getvalue() |
decode('utf8') |
ad.asciidoc.document.attributes.items() |
name.lower() |
self.process_metadata(name, six.text_type(value) |
add_reader(readers) |
register() |
signals.readers_init.connect(add_reader) |
Migration(migrations.Migration) |
mdeditor.fields.MDTextField() |
url(r'^callback/auth/$', ObtainAuthTokenFromCallbackToken.as_view() |
url(r'^auth/email/$', ObtainEmailCallbackToken.as_view() |
url(r'^auth/mobile/$', ObtainMobileCallbackToken.as_view() |
url(r'^callback/verify/$', VerifyAliasFromCallbackToken.as_view() |
url(r'^verify/email/$', ObtainEmailVerificationCallbackToken.as_view() |
url(r'^verify/mobile/$', ObtainMobileVerificationCallbackToken.as_view() |
format_suffix_patterns(urlpatterns) |
get_python_relative_libdir() |
sys.path (PYTHONPATH) |
platform.system() |
distutils.sysconfig.get_python_lib(True, False) |
arch_specific_libdir.split(os.sep) |
re.compile(r"^lib.+$") |
range(len(split_libdir) |
lib_re.match(split_libdir[i]) |
os.sep.join(split_libdir[i:]) |
get_python_relative_libdir() |
sys.stdout.write(lib_dir) |
sys.exit(0) |
sys.exit(1) |
os.path.join(os.path.dirname(__file__) |
pytest.fixture(scope="module") |
hostprovider(sdk_client_ms: ADCMClient) |
sdk_client_ms.upload_from_fs(get_data_dir(__file__, 'hostprovider_bundle') |
bundle.provider_create(utils.random_string() |
pytest.fixture(scope="module") |
host(sdk_client_ms: ADCMClient, hostprovider) |
hostprovider.host_create(utils.random_string() |
pytest.fixture(scope="module") |
cluster(sdk_client_ms: ADCMClient) |
sdk_client_ms.upload_from_fs(get_data_dir(__file__, 'cluster_bundle') |
pytest.fixture(scope="module") |
client(sdk_client_ms: ADCMClient, cluster, hostprovider) |
sdk_client_ms.adcm() |
test_validate_host_prototype(self, client) |
json.loads(json.dumps(client.stack.host.list() |
open(SCHEMAS + '/stack_list_item_schema.json') |
allure.step('Match prototype with schema') |
validate(host_prototype, schema) |
steps.delete_all_data(client) |
test_create_host(self, sdk_client_fs: ADCMClient) |
sdk_client_fs.upload_from_fs(get_data_dir(__file__, 'hostprovider_bundle') |
bundle.provider_create(utils.random_string() |
hp.host_create(utils.random_string() |
allure.step('Reread host') |
host.reread() |
allure.step('Check states and fqdn') |
test_shouldnt_create_duplicate_host(self, sdk_client_fs: ADCMClient) |
hosts (wuth the same fqdn) |
sdk_client_fs.upload_from_fs(get_data_dir(__file__, 'hostprovider_simple') |
bundle.provider_create(utils.random_string() |
hp.host_create("duplicate") |
pytest.raises(coreapi.exceptions.ErrorMessage) |
hp.host_create('duplicate') |
allure.step('Check host conflict') |
err.HOST_CONFLICT.equal(e, 'duplicate host') |
test_shouldnt_create_host_with_unknown_prototype(self, client) |
allure.step('Create provider') |
client.provider.create(prototype_id=client.stack.provider.list() |
utils.random_string() |
allure.step('Create host') |
pytest.raises(coreapi.exceptions.ErrorMessage) |
client.host.create(prototype_id=random.randint(100, 500) |
utils.random_string() |
allure.step('Check PROTOTYPE_NOT_FOUND error') |
err.PROTOTYPE_NOT_FOUND.equal(e, 'prototype doesn\'t exist') |
test_shouldnt_create_host_wo_prototype(self, client) |
allure.step('Create provider') |
client.provider.create(prototype_id=client.stack.provider.list() |
utils.random_string() |
allure.step('Try to create host without prototype') |
pytest.raises(coreapi.exceptions.ParameterError) |
client.host.create(provider_id=provider['id'], fqdn=utils.random_string() |
allure.step('Check prototype_id error') |
str(e.value) |
test_shouldnt_create_host_wo_provider(self, client) |
allure.step('Create prototype') |
get_random_host_prototype(client) |
pytest.raises(coreapi.exceptions.ParameterError) |
client.host.create(prototype_id=proto['id'], fqdn=utils.random_string() |
allure.step('Check provider_id error') |
str(e.value) |
test_create_host_with_max_length_plus_1(self, sdk_client_fs: ADCMClient) |
sdk_client_fs.upload_from_fs(get_data_dir(__file__, 'hostprovider_simple') |
bundle.provider_create(utils.random_string() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.