def test_full_transform_len(self): bytes = (full_flag + '\0' + 7 * '\1' + '\x40' + 'abraka').encode( 'ascii') # 40h = 64d self.assertTrue(check_drapo.check_full_transform(bytes))
def test_full_transform_only(self): bytes = full_flag.encode('ascii') self.assertTrue(check_drapo.check_full_transform(bytes))
def test_full_transform_long(self): bytes = (full_flag + '\0' + 20 * '\x01').encode('ascii') self.assertFalse(check_drapo.check_full_transform(bytes))
def test_full_transform_r(self): bytes = (full_flag + '\rabraka').encode('ascii') self.assertTrue(check_drapo.check_full_transform(bytes))
def test_full_transform_small(self): bytes = full_flag[:10].encode('ascii') self.assertFalse(check_drapo.check_full_transform(bytes))
def test_full_transform_empty(self): bytes = ''.encode('ascii') self.assertFalse(check_drapo.check_full_transform(bytes))
def test_full_transform_wrong_flag(self): wrong_flag = 'W' + full_flag[1:] bytes = wrong_flag.encode('ascii') self.assertFalse(check_drapo.check_full_transform(bytes))