Exemplo n.º 1
0
 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'))
Exemplo n.º 2
0
 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'))
Exemplo n.º 3
0
 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'))