'Test tags related to enterprise should be there in case the request is generated by an authenticated user.'

@httpretty.activate
@override_settings(ZENDESK_CUSTOM_FIELDS=TEST_ZENDESK_CUSTOM_FIELD_CONFIG, ENABLE_ENTERPRISE_INTEGRATION=True)
def test_tags_in_request_with_auth_user_with_enterprise_info(self, zendesk_mock_class, datadog_mock):

    ticket_id = 42
    self.mock_enterprise_learner_api()
    user = self._auth_user
    zendesk_mock_instance = zendesk_mock_class.return_value
    zendesk_mock_instance.create_ticket.return_value = ticket_id
    datadog_valid_tags = ['learner_type:enterprise_learner']
    resp = self._build_and_run_request(user, self._auth_fields)
    self.assertEqual(resp.status_code, 200)
    self._assert_datadog_called(datadog_mock, datadog_valid_tags)
