本文整理汇总了Python中genologics.lims.Lims.get方法的典型用法代码示例。如果您正苦于以下问题:Python Lims.get方法的具体用法?Python Lims.get怎么用?Python Lims.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类genologics.lims.Lims
的用法示例。
在下文中一共展示了Lims.get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get
# 需要导入模块: from genologics.lims import Lims [as 别名]
# 或者: from genologics.lims.Lims import get [as 别名]
def test_get(self, mocked_instance):
lims = Lims(self.url, username=self.username, password=self.password)
r = lims.get('{url}/api/v2/artifacts?sample_name=test_sample'.format(url=self.url))
assert isinstance(r, xml.etree.ElementTree.Element)
assert mocked_instance.call_count == 1
mocked_instance.assert_called_with('http://testgenologics.com:4040/api/v2/artifacts?sample_name=test_sample', timeout=16,
headers={'accept': 'application/xml'}, params={}, auth=('test', 'password'))
示例2: test_get
# 需要导入模块: from genologics.lims import Lims [as 别名]
# 或者: from genologics.lims.Lims import get [as 别名]
def test_get(self, mocked_instance):
lims = Lims(self.url, username=self.username, password=self.password)
r = lims.get('{url}/api/v2/artifacts?sample_name=test_sample'.format(url=self.url))
assert r is not None
assert callable(r.find)
assert hasattr(r.attrib, '__getitem__')
assert mocked_instance.call_count == 1
mocked_instance.assert_called_with('http://testgenologics.com:4040/api/v2/artifacts?sample_name=test_sample', timeout=16,
headers={'accept': 'application/xml'}, params={}, auth=('test', 'password'))