Permalink
Browse files

make admin comands case insensitive

  • Loading branch information...
1 parent 51cb7bc commit b31327b5aec8a4e467f34b5462e5d643e7755f42 oau committed Apr 17, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 core.py
  2. +1 −1 core_test.py
View
@@ -328,6 +328,7 @@ def run(self):
a = self.data.get_admin(src,dest,msg)
if a:
keyword,cmd,group = a
+ cmd = cmd.lower()
self._log("doing command '%s' to group %d"%(cmd,group))
if cmd.startswith('add sender '):
number = normalize_number(cmd[len('add sender '):])
View
@@ -101,7 +101,7 @@ def test_run_admin_command_add_sender(self):
gid = self.data.add_group("group1")
mid = self.data.add_number(number, "alias", gid)
self.data.set_admin(phone, member_id = mid)
- self.data.fake_incoming(number, phone, "add sender 073123")
+ self.data.fake_incoming(number, phone, "Add Sender 073123")
self.Doer.run()
assert "+4673123" in map(lambda x: x['number'],
self.data.get_group_members(gid))

0 comments on commit b31327b

Please sign in to comment.