def test_fetch_makes_a_get_request(self): m = mock.Mock() m.get.return_value = self._http_ok(self.blob_response) fetcher.fetch(self.session, m) m.get.assert_called_with( 'https://lastpass.com/getaccts.php?mobile=1&b64=1&hash=0.0&hasplugin=3.0.23&requestsrc=android', cookies={'PHPSESSID': self.session_id})
def test_fetch_returns_a_blob(self): m = mock.Mock() m.get.return_value = self._http_ok(self.blob_response) self.assertEqual(fetcher.fetch(self.session, m), self.blob)
def test_fetch_makes_a_get_request(self): m = mock.Mock() m.get.return_value = self._http_ok(self.blob_response) fetcher.fetch(self.session, m) m.get.assert_called_with('https://lastpass.com/getaccts.php?mobile=1&b64=1&hash=0.0&hasplugin=3.0.23&requestsrc=android', cookies={'PHPSESSID': self.session_id})