Skip to content

Commit

Permalink
populate_db: Add --extra-bots option to create extra bots.
Browse files Browse the repository at this point in the history
  • Loading branch information
timabbott committed Feb 11, 2017
1 parent b867ac3 commit 7e8d3d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zilencer/management/commands/populate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def add_arguments(self, parser):
default=0,
help='The number of extra users to create')

parser.add_argument('--extra-bots',
dest='extra_bots',
type=int,
default=0,
help='The number of extra bots to create')

parser.add_argument('--huddles',
dest='num_huddles',
type=int,
Expand Down Expand Up @@ -234,6 +240,8 @@ def handle(self, **options):
("Zulip Error Bot", "[email protected]"),
("Zulip Default Bot", "[email protected]"),
]
for i in range(options["extra_bots"]):
zulip_realm_bots.append(('Extra Bot %d' % (i,), 'extrabot%[email protected]' % (i,)))
zulip_realm_bots.extend(all_realm_bots)
create_users(zulip_realm, zulip_realm_bots, bot_type=UserProfile.DEFAULT_BOT)

Expand Down

0 comments on commit 7e8d3d9

Please sign in to comment.