Exemple #1
0
 def setUp(self):
     global compare
     replaylib.start_record()
     webf = urllib.urlopen('http://localhost:%d' % servers.PORT)
     compare = webf.read()
     webf.close()
     replaylib.stop_record(TEST_FILENAME)
     PluginTester.setUp(self)
    def test_with_file(self):
        replaylib.start_record()
        real = self._grab()
        replaylib.stop_record(TEST_FILENAME)
        replaylib.start_playback(TEST_FILENAME)
        fake = self._grab()
        replaylib.stop_playback()

        assert real == fake
Exemple #3
0
 def report(self, stream):
     if self.playback_filename:
         replaylib.stop_playback()
     else:
         replaylib.stop_record(self.record_filename)