827c827,831 < return(server.expect("STORED", raise_exception=True) --- > if cmd == 'add': > expected = ("STORED", "NOT_STORED") > else: > expected = "STORED" > return(server.expect(expected, raise_exception=True) 1197,1199c1201,1207 < if line != text: < self.debuglog("while expecting '%s', got unexpected response '%s'" < % (text, line)) --- > if isinstance(text, (list, tuple, set)): > check = line in text > else: > check = line == text > if not check: > self.debuglog("while expecting %s, got unexpected response '%s'" > % (repr(text), line))