def test_unique_empty_slug(self):
        """Ensure events with no slugs are saved to the DB.

        This is a regression test introduces with one change from
        https://github.com/swcarpentry/amy/issues/427
        (saving empty slug strings to the DB should result in NULL values)."""
        data = {
            'host': self.test_host.id,
            'tags': [self.test_tag.id],
            'slug': '',
            'invoice_status': 'unknown',
        }
        response = self.client.post(reverse('event_add'), data)
        assert response.status_code == 302

        response = self.client.post(reverse('event_add'), data)
        assert response.status_code == 302
dataset/ETHPy150Open swcarpentry/amy/workshops/test/test_event.py/TestEventViews.test_unique_empty_slug/original