Beispiel #1
0
    def test_equality(self):
        a = DownloadInfo(self.codec, self.bitrate_in_kbps, self.gain, self.preview, self.download_info_url, self.direct)
        b = DownloadInfo(self.codec, 128, self.gain, True, self.download_info_url, True)
        c = DownloadInfo(self.codec, self.bitrate_in_kbps, self.gain, self.preview, self.download_info_url, self.direct)

        assert a != b
        assert hash(a) != hash(b)
        assert a is not b

        assert a == c
Beispiel #2
0
def download_info():
    return DownloadInfo(
        TestDownloadInfo.codec,
        TestDownloadInfo.bitrate_in_kbps,
        TestDownloadInfo.gain,
        TestDownloadInfo.preview,
        TestDownloadInfo.download_info_url,
        TestDownloadInfo.direct,
    )