def test_record(self):
            import time
            tracker = self.mox.CreateMockAnything()
            analytics = Mixpanel(tracker=tracker)
            now = time.gmtime()
            self.mox.StubOutWithMock(time, 'gmtime')
            time.gmtime().AndReturn(now)
            with self.web_user(AnonymousUser()) as experiment_user:
                properties = {
                    'time': '%d' % time.mktime(now),
                    'distinct_id': ('Session %s' %
                                    experiment_user.session.session_key),
                    'Goal Type': 'Goal Type'
                }
                tracker.run(event_name='Goal Recorded',
                            properties=properties)
                self.mox.ReplayAll()
                goal_type = GoalType.objects.create(name='Goal Type')
                goal_record = GoalRecord.record(goal_name=goal_type.name,
                                                experiment_user=experiment_user)
                analytics.record(goal_record=goal_record,
                                 experiment_user=experiment_user)
                self.mox.VerifyAll()
dataset/ETHPy150Open e-loue/django-lean/django_lean/lean_analytics/tests.py/TestMixpanel.test_record/original