Support testing with multiple backend instances

This is useful for testing backends with different configurations
(different sites, being anonymous or not, etc.)
The previous behavior was to chose a random backend instance.
This commit is contained in:
Laurent Bachelier 2011-05-01 23:50:40 +02:00
commit aa939ca2bd
2 changed files with 23 additions and 6 deletions

View file

@ -42,12 +42,13 @@ class Pastoob(ReplApplication):
self.load_config()
return ReplApplication.main(self, argv)
def do_get(self, _id):
def do_get(self, _id, *args):
"""
get ID
Get a paste contents.
"""
print args
if not _id:
print >>sys.stderr, 'This command takes an argument: %s' % self.get_command_help('get', short=True)
return 1