Ejemplo n.º 1
0
    def test_package_version_check_with_create_and_without_version(self):
        args = mock.MagicMock(create='plugin_path',
                              package_version=None,
                              build=None,
                              check=None)

        parser = mock.MagicMock()

        package_version_check(args, parser)
        self.method_was_not_called(parser.error)
Ejemplo n.º 2
0
    def test_package_version_check_with_build_and_version(self):
        args = mock.MagicMock(create=None,
                              package_version='2.0.0',
                              build='plugin_path',
                              check=None)

        parser = mock.MagicMock()

        package_version_check(args, parser)
        parser.error.assert_called_with(
            '--package-version works only with --create')