code
stringlengths
3
6.57k
pytest_twisted._use_asyncio_selector_if_required(config=config)
testdir.makeconftest(conftest_file)
test_succeed()
testdir.makepyfile(test_file)
testdir.run(*cmd_opts, timeout=timeout)
assert_outcomes(rr, {"passed": 1})
env_queue_config('NOTIFICATIONS_REPO')
env_queue_config('DELIVERY_OUTBOX_REPO')
env_s3_config('SUBSCRIPTIONS_REPO')
env_queue_config('CHANNEL_REPO')
env('ENDPOINT', default='AU')
pytest.fixture(scope='function')
notifications_repo()
repos.Notifications(NOTIFICATIONS_REPO)
repo._unsafe_method__clear()
pytest.fixture(scope='function')
delivery_outbox_repo()
repos.DeliveryOutbox(DELIVERY_OUTBOX_REPO)
repo._unsafe_method__clear()
pytest.fixture(scope='function')
subscriptions_repo()
repos.Subscriptions(SUBSCRIPTIONS_REPO)
repo._unsafe_method__clear()
pytest.fixture(scope='function')
channel_repo()
repos.Channel(CHANNEL_REPO)
repo._unsafe_method__clear()
__init__(self, base_url=None)
base_url.endswith('/')
get_callback_record(self, index)
urllib.parse.urljoin(self.base_url, f'callbacks/{index}')
requests.get(url)
response.json()
Exception(f'Unexpected response:{response.status_code}')
get_callback_records(self)
urllib.parse.urljoin(self.base_url, 'callbacks')
requests.get(url)
response.json()
Exception(f'Unexpected response:{response.status_code}')
clear_callback_records(self)
urllib.parse.urljoin(self.base_url, 'callbacks')
requests.delete(url)
Exception(f'Unexpected response:{response.status_code}')
valid_callback_url(self, id)
urllib.parse.urljoin(self.base_url, f'callback/valid/{id}')
invalid_callback_url(self, id)
urllib.parse.urljoin(self.base_url, f'callback/invalid/{id}')
pytest.fixture(scope='function')
callback_server()
CallbackServer('http://baseline-channel-api-callback-server:11001')
callback_server.clear_callback_records()
lg.basicConfig(format='%(asctime)
initialise()
lg.info('INITIALISED')
lg.warning('INITIALISED')
lg.debug('INITIALISED')
caput(pv.me14e_stage_x + '.VMAX', 15)
caput(pv.me14e_stage_y + '.VMAX', 15)
caput(pv.me14e_stage_z + '.VMAX', 15)
caput(pv.me14e_filter + '.VMAX', 15)
caput(pv.me14e_stage_x + '.VELO', 15)
caput(pv.me14e_stage_y + '.VELO', 15)
caput(pv.me14e_stage_z + '.VELO', 15)
caput(pv.me14e_filter + '.VELO', 15)
caput(pv.me14e_stage_x + '.ACCL', 0.01)
caput(pv.me14e_stage_y + '.ACCL', 0.01)
caput(pv.me14e_stage_z + '.ACCL', 0.01)
caput(pv.me14e_filter + '.ACCL', 0.01)
caput(pv.me14e_stage_x + '.HLM', 30)
caput(pv.me14e_stage_x + '.LLM', -30)
caput(pv.me14e_stage_y + '.HLM', 30)
caput(pv.me14e_stage_y + '.LLM', -30)
caput(pv.me14e_stage_z + '.HLM', 5.1)
caput(pv.me14e_stage_z + '.LLM', -4.1)
caput(pv.me14e_filter + '.HLM', 0.1)
caput(pv.me14e_filter + '.LLM', -45.0)
caput('ME14E-MO-IOC-01:GP1', 0)
caput('ME14E-MO-IOC-01:GP2', 0)
range(3, 100)
str(i)
caput(pvar, 1)
sys.stdout.write('.')
sys.stdout.flush()
write_parameter_file()
lg.info('Writing Parameter File\n', param_path+param_fid)
lg.info('CHIP_MANAGER\twrite_parameter_file:Writing')
open(param_path + param_fid,'w')
caget(pv.me14e_chip_name)
f.write('chip_name \t%s\n' %chip_name)
f.write('path \t%s\n' %path)
caget(pv.me14e_filepath)
f.write('protein_name \t%s\n' %protein_name)
caget(pv.me14e_gp3)
f.write('n_exposures \t%s\n' %n_exposures)
caget(pv.me14e_gp1)
str(chip_type)
f.write('chip_type \t%s\n' %chip_type)
caget(pv.me14e_gp2)
f.write('map_type \t%s\n' %map_type)
f.close()