def test_storeclient_handle_url_trailing_slashes(self): test_client = StoreClient('http://store.example.com') self.assertEqual(test_client._url, 'http://store.example.com/') test_client = StoreClient('http://store.example.com///') self.assertEqual(test_client._url, 'http://store.example.com/')
def _process_store_info(self, element): result = { 'name': element.get('name'), 'url': element.xpath(URL_XPATH)[0].text, 'registrationDate': element.xpath(DATE_XPATH)[0].text } if result['name'] not in self._stores: self._stores[result['name']] = StoreClient(result['url']) return result
def test_storeclient_must_ignore_params_query_and_framgent(self): test_client = StoreClient('http://store.example.com/?query=a#a') self.assertEqual(test_client._url, 'http://store.example.com/')
def setUp(self): super(StoreTestCase, self).setUp() self.store_client = StoreClient('http://example.com') self.network._servers['http']['example.com'].clear()