'Verify that users can be added to a cohort of a course they\'re not
enrolled in.  This feature is currently used to pre-cohort users that
are expected to enroll in a course. Also tests that adding unenrolled
users does not alter the number of "active" users in the user_count.'

def test_can_cohort_unenrolled_users(self):

    start_count = self.cohort1.users.count()
    unenrolled_usernames = [user.username for user in self.unenrolled_users]
    response_dict = self.request_add_users_to_cohort(','.join(unenrolled_usernames), self.cohort1, self.course)
    self.check_user_count(expected_count=start_count, cohort=self.cohort1)
    self.verify_added_users_to_cohort(response_dict, self.cohort1, self.course, expected_added=self.unenrolled_users, expected_changed=[], expected_present=[], expected_preassigned=[], expected_unknown=[], expected_invalid=[])
