res = mc.delete(key)
    empty(key)


print(
    """#---------------------------# sasl tests #--------------------------#"""
)

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.set('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.delete('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.set('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.flush()
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

res = mc.sasl_list()
if res[0]['val'].find('PLAIN') == -1:
    print "Error"
    return iequal(res[0]['status'], STATUS['KEY_ENOENT'], 1)

def delete(key, when):
    res = mc.delete(key)
    empty(key)

print("""#---------------------------# sasl tests #--------------------------#""")

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.set('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.delete('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.set('x', 'somevalue')
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
    mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
    res = mc1.flush()
    iequal(res[0]['status'], STATUS['AUTH_ERROR'])

res = mc.sasl_list()
if res[0]['val'].find('PLAIN') == -1:
    print "Error"