'Test population of created_on_site attribute by user ids.'

def test_command_by_user_ids(self):

    call_command('populate_created_on_site_user_attribute', '--users', self.user_ids, '--site-domain', self.site.domain)
    for user in self.users:
        self.assertEqual(UserAttribute.get_user_attribute(user, CREATED_ON_SITE), self.site.domain)
    call_command('populate_created_on_site_user_attribute', '--users', self.user_ids, '--site-domain', self.site_other.domain)
    for user in self.users:
        self.assertNotEqual(UserAttribute.get_user_attribute(user, CREATED_ON_SITE), self.site_other.domain)
