Exemple #1
0
 def test_delete_with_id_nonexistent(self):
     event_filter = EventFilter(user_id=5)
     event_filter.save()
     nonexistent_id = event_filter.id
     event_filter.delete()
     response = self._delete(nonexistent_id)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)
 def test_delete_with_id_nonexistent(self):
     event_filter = EventFilter(
         user_id=5
     )
     event_filter.save()
     nonexistent_id = event_filter.id
     event_filter.delete()
     response = self._delete(nonexistent_id)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)
 def test_get_with_id_nonexsitent(self):
     event_filter = EventFilter(
         user_id=5,
         settings_json='{"server_id":1,"host_id":2,"hostgroup_id":3}')
     event_filter.save()
     id = event_filter.id
     event_filter.delete()
     response = self._get(id)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)
Exemple #4
0
 def test_get_with_id_nonexsitent(self):
     event_filter = EventFilter(
         user_id=5,
         settings_json='{"server_id":1,"host_id":2,"hostgroup_id":3}')
     event_filter.save()
     id = event_filter.id
     event_filter.delete()
     response = self._get(id)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)
 def test_put_with_id_nonexistent(self):
     event_filter = EventFilter(
         user_id=5,
         settings_json='{"server_id":1,"host_id":2,"hostgroup_id":3}')
     event_filter.save()
     nonexistent_id = event_filter.id
     event_filter.delete()
     record = {
         'server_id': 4,
         'host_id': 5,
         'hostgroup_id': 6,
     }
     response = self._put(nonexistent_id, record)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)
Exemple #6
0
 def test_put_with_id_nonexistent(self):
     event_filter = EventFilter(
         user_id=5,
         settings_json='{"server_id":1,"host_id":2,"hostgroup_id":3}')
     event_filter.save()
     nonexistent_id = event_filter.id
     event_filter.delete()
     record = {
         'server_id': 4,
         'host_id': 5,
         'hostgroup_id': 6,
     }
     response = self._put(nonexistent_id, record)
     self.assertEquals(response.status_code, httplib.NOT_FOUND)