예제 #1
0
 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})
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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})