'log in the specified user and set its is_active field'

def setup_user(self, requesting_user, make_inactive=False):

    self.assertTrue(self.client.login(username=requesting_user.username, password=TEST_PASSWORD))
    if make_inactive:
        requesting_user.is_active = False
        requesting_user.save()
