

def test_add_two_minimal_events(self):
    host = Host.objects.get(fullname='Test Host')
    url = reverse('event_add')
    data = {
        'host': host.id,
        'tags': [data.test_tag.id],
        'administrator': host.id,
        'invoice_status': 'unknown',
    }
    response = self.client.post(url, data)
    assert (response.status_code == 302), 'expected 302 redirect after first post, got {}'.format(response.status_code)
    response = self.client.post(url, data)
    if (response.status_code != 302):
        self._check_status_code_and_parse(response, 200)
        assert (response.status_code == 302), 'expected 302 redirect after second post, got {}'.format(response.status_code)

dataset/ETHPy150Open swcarpentry/amy/workshops/test/test_event.py TestEventViews.test_add_two_minimal_events/VarMisuse@44/62 `self`->`data`