def setUp(self):
        past = datetime.date(1993, 8, 30)
        today = datetime.date.today()
        future = datetime.date(2030, 3, 25)
        delta_2d = datetime.timedelta(days=2)
        delta_1d = datetime.timedelta(days=1)
        host = Host.objects.create(domain='host.edu', fullname='Host EDU')

        # past event
        self.event1 = Event.objects.create(
            slug='event1', start=past - delta_2d, end=past - delta_1d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
            url='https://user.github.io/repository/',
        )
        # ongoing event
        self.event2 = Event.objects.create(
            slug='event2', start=today - delta_2d, end=today + delta_2d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
            url='https://github.com/user/repository',
        )
        # future event
        self.event3 = Event.objects.create(
            slug='event3', start=future - delta_2d, end=future + delta_2d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
            url='http://github.com/user/repository/',
            reg_key='12341234',
        )
        # event with missing start
        self.event4 = Event.objects.create(
            slug='event4', end=past + delta_2d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
            url='http://url4/',
        )
        # event with missing URL
        self.event5 = Event.objects.create(
            slug='event5', start=delta_2d - future, end=future + delta_2d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
        )
        # event with missing country
        self.event6 = Event.objects.create(
            slug='event6', start=future - delta_2d, end=future + delta_2d,
            host=host, latitude=3, longitude=-2, venue='University',
            address='On the street', country=None, contact='sb@sth.edu',
            url='http://url6/',
        )
        # event with missing venue
        self.event7 = Event.objects.create(
            slug='event7', start=future - delta_2d, end=future + delta_2d,
            host=host, latitude=3, longitude=-2, venue='',
            address='On the street', country='US', contact='sb@sth.edu',
            url='http://url7/',
        )
        # event with missing both start and URL
        self.event8 = Event.objects.create(
            slug='event8', end=future + delta_1d,
            host=host, latitude=3.1, longitude=-1.9, venue='University',
            address='On the street', country='US', contact='sb@sth.edu',
        )
        # event with missing both country and venue
        self.event9 = Event.objects.create(
            slug='event9', start=future - delta_2d, end=future + delta_1d,
            host=host, latitude=3.1, longitude=-1.9, venue='',
            address='On the street', country=None, contact='sb@sth.edu',
            url='http://url9/',
        )
        # event with missing start, URL, country, and venue
        self.event10 = Event.objects.create(
            slug='event10', end=future + delta_1d,
            host=host, latitude=3.1, longitude=-1.9, venue='',
            address='On the street', country=None, contact='sb@sth.edu',
        )

        self.expecting = [
            {
                'slug': 'event3',
                'start': self.event3.start,
                'end': self.event3.end,
                'humandate': 'Mar 23-27, 2030',
                'latitude': 3.,
                'longitude': -2.,
                'venue': 'University',
                'address': 'On the street',
                'country': 'US',
                'url': 'https://user.github.io/repository/',
                'contact': 'sb@sth.edu',
                'eventbrite_id': '12341234',
                'tags': [],
            },
            {
                'slug': 'event2',
                'start': self.event2.start,
                'end': self.event2.end,
                'humandate': self.event2.human_readable_date,
                'latitude': 3.,
                'longitude': -2.,
                'venue': 'University',
                'address': 'On the street',
                'country': 'US',
                'url': 'https://user.github.io/repository/',
                'contact': 'sb@sth.edu',
                'eventbrite_id': None,
                'tags': [],
            },
            {
                'slug': 'event1',
                'start': self.event1.start,
                'end': self.event1.end,
                'humandate': 'Aug 28-29, 1993',
                'latitude': 3.,
                'longitude': -2.,
                'venue': 'University',
                'address': 'On the street',
                'country': 'US',
                'url': 'https://user.github.io/repository/',
                'contact': 'sb@sth.edu',
                'eventbrite_id': None,
                'tags': [],
            },
        ]
dataset/ETHPy150Open swcarpentry/amy/api/test/test_events.py/TestListingPublishedEvents.setUp/swapped operands of `-`