def test_recording(self): replaylib.start_playback(TEST_FILENAME) webf = urllib.urlopen('http://localhost:%d' % servers.PORT) fake = webf.read() webf.close() replaylib.stop_playback() assert fake == compare
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
def begin(self): if self.playback_filename: replaylib.start_playback(self.playback_filename) else: replaylib.start_record()