Skip to content

Commit

Permalink
Add more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
godwhoa committed Dec 11, 2017
1 parent 3214e31 commit 224fbf9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/piqueserver/test_commands.py
@@ -1,5 +1,5 @@
from piqueserver.commands import command
import unittest
from piqueserver.commands import command, _alias_map


class TestCommandDecorator(unittest.TestCase):
Expand All @@ -16,3 +16,15 @@ def test_command_name(self):
def test():
pass
self.assertEqual(test.command_name, 'test')

def test_command_rename(self):
@command('notatest')
def test():
pass
self.assertEqual(test.command_name, 'notatest')

def test_command_alias(self):
@command('name', 'n')
def test():
pass
self.assertEqual(_alias_map['n'], 'name')

0 comments on commit 224fbf9

Please sign in to comment.