Ejemplo n.º 1
0
    def do_add(self, arguments):
        """add a new remote module repository"""
        
        if len(arguments.options) == 1:
            url = arguments.options[0]

            Remote.create(url)
            
            print "Added remote: %s.\n" % url
        else:
            print "usage: drozer module remote create http://path.to.repository/\n"
Ejemplo n.º 2
0
    def do_add(self, arguments):
        """add a new remote module repository"""

        if len(arguments.options) == 1:
            url = arguments.options[0]

            Remote.create(url)

            print "Added remote: %s.\n" % url
        else:
            print "usage: drozer module remote create http://path.to.repository/\n"
Ejemplo n.º 3
0
    def testItShouldNotReAddARemote(self):
        Configuration._Configuration__config = self.mockConfigWithRemotes(
            ["http://myremote.com/"])

        assert not Remote.create("http://myremote.com/")
        assert Remote.all() == ["http://myremote.com/"]