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"
def testItShouldNotReAddARemote(self): Configuration._Configuration__config = self.mockConfigWithRemotes( ["http://myremote.com/"]) assert not Remote.create("http://myremote.com/") assert Remote.all() == ["http://myremote.com/"]