'Initialize the specified number of fake emails'

def setup_fake_email_info(self, num_emails, with_failures=False):

    for email_id in range(num_emails):
        num_sent = random.randint(1, 15401)
        if with_failures:
            failed = random.randint(1, 15401)
        else:
            failed = 0
        self.tasks[email_id] = FakeContentTask(email_id, num_sent, failed, 'expected')
        self.emails[email_id] = FakeEmail(email_id)
        self.emails_info[email_id] = FakeEmailInfo(self.emails[email_id], num_sent, failed)
