'Testing whether a correct pieces bitmask is returned when requested'

def test_get_pieces_bitmask(self):

    self.libtorrent_download_impl.handle.status().pieces = [True, False, True, False, False]
    self.assertEqual(self.libtorrent_download_impl.get_pieces_base64(), 'oA==')
    self.libtorrent_download_impl.handle.status().pieces = [(True * 16)]
    self.assertEqual(self.libtorrent_download_impl.get_pieces_base64(), 'gA==')
