'Test population of created_on_site attribute by activation keys.'

def test_command_by_activation_keys(self):

    call_command('populate_created_on_site_user_attribute', '--activation-keys', self.activation_keys, '--site-domain', self.site.domain)
    for register_user in self.registered_users:
        self.assertEqual(UserAttribute.get_user_attribute(register_user.user, CREATED_ON_SITE), self.site.domain)
    call_command('populate_created_on_site_user_attribute', '--activation-keys', self.activation_keys, '--site-domain', self.site_other.domain)
    for register_user in self.registered_users:
        self.assertNotEqual(UserAttribute.get_user_attribute(register_user.user, CREATED_ON_SITE), self.site_other.domain)
