'Test tags related to enterprise should not be there in case an unauthenticated user.'

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

    ticket_id = 42
    self.mock_enterprise_learner_api()
    user = self._anon_user
    zendesk_mock_instance = zendesk_mock_class.return_value
    zendesk_mock_instance.create_ticket.return_value = ticket_id
    datadog_valid_tags = ['issue_type:{}'.format(self._anon_fields['issue_type'])]
    datadog_invalid_tags = ['learner_type:enterprise_learner']
    resp = self._build_and_run_request(user, self._anon_fields)
    self.assertEqual(resp.status_code, 200)
    expected_datadog_calls = [mock.call.increment(views.DATADOG_FEEDBACK_METRIC, tags=datadog_valid_tags)]
    self.assertEqual(datadog_mock.mock_calls, expected_datadog_calls)
    not_expected_datadog_calls = [mock.call.increment(views.DATADOG_FEEDBACK_METRIC, tags=datadog_invalid_tags)]
    self.assertNotEqual(datadog_mock.mock_calls, not_expected_datadog_calls)
