def test_form_valid(self):
        self.client.post(
            reverse('create_message'),
            {'subject': 'fjdsklfs', 'text': 'jdfklsj', 'group': self.group1.pk},
            HTTP_USER_AGENT='Chromefox',
            HTTP_X_FORWARDED_FOR='7.0.9.3',
            REMOTE_ADDR='1.2.3.4'
        )
        message = Message.objects.latest('pk')
        self.assertEqual(message.sender, self.user1)
        self.assertEqual(message.user_agent, 'Chromefox')
        self.assertEqual(message.ip_address, '7.0.9.3')
Writes an ``Event`` object to Splunk.
dataset/ETHPy150Open ofa/connect/open_connect/connectmessages/tests/test_views.py/MessageCreateViewTest.test_form_valid--crossover with--dataset/ETHPy150Open splunk/splunk-app-twitter/twitter2/bin/splunklib/modularinput/event_writer.py/EventWriter.write_event