class TestSubmitCommand(object):

    def setup(self):
        self.packages = spy(mappers.PackageMapper(empty_stub()))
        self.command = SubmitCommand(self.packages)

    def test_create_new_package(self):
        when(self.packages.get_by_name).then_raise(errors.NotFoundError())

        self.command.execute(
            license=u'MIT/X11',
            name=u'viper',
            author=u'Néstor Salceda',
            home_page=None,
            download_url=None,
            summary=None,
            author_email=u'*****@*****.**',
            version=u'0.1dev',
            platform=None,
            keywords=None,
            classifiers=[],
            description=None
        )

        assert_that_method(self.packages.store).was_called()
Exemple #2
0
class TestSubmitCommand(object):
    def setup(self):
        self.packages = spy(mappers.PackageMapper(empty_stub()))
        self.command = SubmitCommand(self.packages)

    def test_create_new_package(self):
        when(self.packages.get_by_name).then_raise(errors.NotFoundError())

        self.command.execute(license=u'MIT/X11',
                             name=u'viper',
                             author=u'Néstor Salceda',
                             home_page=None,
                             download_url=None,
                             summary=None,
                             author_email=u'*****@*****.**',
                             version=u'0.1dev',
                             platform=None,
                             keywords=None,
                             classifiers=[],
                             description=None)

        assert_that_method(self.packages.store).was_called()
 def setup(self):
     self.packages = spy(mappers.PackageMapper(empty_stub()))
     self.command = SubmitCommand(self.packages)
Exemple #4
0
 def setup(self):
     self.packages = spy(mappers.PackageMapper(empty_stub()))
     self.command = SubmitCommand(self.packages)