Exemplo n.º 1
0
 def test_retrieve(self):
     grids.retrieve('hodor:88')
     assert self.request_mock.call_count == 1
     args, kwargs = self.request_mock.call_args
     method, url = args
     self.assertEqual(method, 'get')
     self.assertEqual(url,
                      '{}/v2/grids/hodor:88'.format(self.plotly_api_domain))
     self.assertEqual(kwargs['params'], {})
Exemplo n.º 2
0
 def test_retrieve_share_key(self):
     grids.retrieve('hodor:88', share_key='foobar')
     self.request_mock.assert_called_once()
     args, kwargs = self.request_mock.call_args
     method, url = args
     self.assertEqual(method, 'get')
     self.assertEqual(url,
                      '{}/v2/grids/hodor:88'.format(self.plotly_api_domain))
     self.assertEqual(kwargs['params'], {'share_key': 'foobar'})
Exemplo n.º 3
0
 def test_retrieve_share_key(self):
     grids.retrieve('hodor:88', share_key='foobar')
     assert self.request_mock.call_count == 1
     args, kwargs = self.request_mock.call_args
     method, url = args
     self.assertEqual(method, 'get')
     self.assertEqual(
         url, '{}/v2/grids/hodor:88'.format(self.plotly_api_domain)
     )
     self.assertEqual(kwargs['params'], {'share_key': 'foobar'})
Exemplo n.º 4
0
 def test_retrieve(self):
     grids.retrieve('hodor:88')
     self.request_mock.assert_called_once()
     args, kwargs = self.request_mock.call_args
     method, url = args
     self.assertEqual(method, 'get')
     self.assertEqual(
         url, '{}/v2/grids/hodor:88'.format(self.plotly_api_domain)
     )
     self.assertEqual(kwargs['params'], {})