def METHOD_NAME(self):
    """test the new roles added for the API"""
    a1 = models.Account.make_account(email="a1@example.com", username="a1_user", name="a1_name",
                                     roles=["user", "api"], associated_journal_ids=[])
    a1.save(blocking=True)
    # Check an API key was generated on account creation
    a1_key = a1.api_key
    assert a1_key is not None
    # Check we can retrieve the account by its key
    a1_retrieved = models.Account.pull_by_api_key(a1_key)
    assert a1 == a1_retrieved, (a1, a1_retrieved)
    # Check that removing the API role means you don't get a key
    a1.remove_role('api')
    assert a1.api_key is None