Fix for missing value in transmitter delaction

pull/124/head
Steven Hiscocks 2013-02-20 23:24:46 +00:00
parent 088e40c481
commit b6a68f5138
2 changed files with 5 additions and 3 deletions

View File

@ -183,6 +183,7 @@ class Transmitter:
self.__server.addAction(name, value)
return self.__server.getLastAction(name).getName()
elif command[1] == "delaction":
value = command[2]
self.__server.delAction(name, value)
return None
elif command[1] == "setcinfo":

View File

@ -433,9 +433,10 @@ class Transmitter(unittest.TestCase):
self.__transm.proceed(
["set", self.jailName, "delcinfo", action, "KEY"]),
(0, None))
#FIXME: This is broken in server.transmitter (value not defined)
"""
self.assertEqual(
self.__transm.proceed(["set", self.jailName, "delaction", action]),
(0, None))
"""
self.assertEqual(
self.__transm.proceed(
["set", self.jailName, "delaction", "Doesn't exist"]),
(0, None)) #NOTE: Should this return 1?