Commits

Sebastian  committed 201e90f

changed test_add_command to check for UnknownCommand before injection

  • Participants
  • Parent commits 0d30735
  • Branches add_commands

Comments (0)

Files changed (1)

File sievelib/tests/parser.py

 class AdditionalCommands(SieveTest):
 
     def test_add_command(self):
+        self.assertRaises(sievelib.commands.UnknownCommand, sievelib.commands.get_command_instance, 'mytest')
         sievelib.commands.add_commands(MytestCommand)
         sievelib.commands.get_command_instance('mytest')
-        self.assertRaises(sievelib.commands.UnknownCommand, sievelib.commands.get_command_instance, 'unknowncommand')
         self.compilation_ok("""
         mytest :testtag 10 ["testrecp1@example.com"];
         """)
-        
+
 
 class ValidSyntaxes(SieveTest):