Exemplo n.º 1
0
    def test_version_by_command_name(self):
        """Test Version By Command Name"""

        with self.assertRaises(SystemExit):
            call_command(self.command, "--version", verbosity=0)
Exemplo n.º 2
0
    def test_unknown_command_error(self):
        """Test Unknown Command Error"""

        with self.assertRaises(CommandError):
            call_command("unknown", verbosity=0)
Exemplo n.º 3
0
    def test_help_by_command_name(self):
        """Test Help By Command Name"""

        with self.assertRaises(SystemExit):
            call_command(self.command, "--help", verbosity=0)
Exemplo n.º 4
0
    def test_version_by_class(self):
        """Test Help By Class"""

        with self.assertRaises(SystemExit):
            call_command(Command(), "--version", verbosity=0)