ooiservices/tests/test_notifications.py
def delete_alertfilters(self,list_of_ids):
        """
        Delete alertfilters in uframe; development helper only to be used during controlled testing.
        """
        debug = False
        if debug: print '\n Deleting alertfilter ids: ', list_of_ids
        headers = self.get_api_headers('admin', 'test')
        uframe_url, timeout, timeout_read = self.get_uframe_info()
        for id in list_of_ids:
            if id > 3 and id != 2228:
                url = "/".join([uframe_url, 'alertfilters', str(id)])
                if debug: print '\n delete url: ', url

                response = requests.delete(url, timeout=(timeout, timeout_read), headers=headers)
                self.assertEquals(response.status_code, 200)
                get_uframe_data = json.loads(response.content)

                # Sample Delete response dictionary: {u'message': u'Delete successful.', u'id': 204, u'statusCode': u'OK'}
                self.assertTrue('message' in get_uframe_data)
                self.assertTrue('id' in get_uframe_data)
                self.assertTrue('statusCode' in get_uframe_data)
                self.assertEquals(get_uframe_data['statusCode'],'OK')
        return

        Delete alertfilters in uframe; development helper only to be used during controlled testing.
        
Delete alertfilters in uframe; development helper only to be used during controlled testing.
Delete alertfilters in uframe ; development helper only to be used during controlled testing .
def delete_alertfilters(self,list_of_ids):
        debug = False
        if debug: print '\n Deleting alertfilter ids: ', list_of_ids
        headers = self.get_api_headers('admin', 'test')
        uframe_url, timeout, timeout_read = self.get_uframe_info()
        for id in list_of_ids:
            if id > 3 and id != 2228:
                url = "/".join([uframe_url, 'alertfilters', str(id)])
                if debug: print '\n delete url: ', url
                response = requests.delete(url, timeout=(timeout, timeout_read), headers=headers)
                self.assertEquals(response.status_code, 200)
                get_uframe_data = json.loads(response.content)
                self.assertTrue('message' in get_uframe_data)
                self.assertTrue('id' in get_uframe_data)
                self.assertTrue('statusCode' in get_uframe_data)
                self.assertEquals(get_uframe_data['statusCode'],'OK')
        return
def delete_alertfilters ( self , list_of_ids ) : debug = False if debug : print '\n Deleting alertfilter ids: ' , list_of_ids headers = self . get_api_headers ( 'admin' , 'test' ) uframe_url , timeout , timeout_read = self . get_uframe_info ( ) for id in list_of_ids : if id > 3 and id != 2228 : url = "/" . join ( [ uframe_url , 'alertfilters' , str ( id ) ] ) if debug : print '\n delete url: ' , url response = requests . delete ( url , timeout = ( timeout , timeout_read ) , headers = headers ) self . assertEquals ( response . status_code , 200 ) get_uframe_data = json . loads ( response . content ) self . assertTrue ( 'message' in get_uframe_data ) self . assertTrue ( 'id' in get_uframe_data ) self . assertTrue ( 'statusCode' in get_uframe_data ) self . assertEquals ( get_uframe_data [ 'statusCode' ] , 'OK' ) return
Delete alertfilters in uframe; development helper only to be used during controlled testing.
Delete alertfilters in uframe ; development helper only to be used during controlled testing .
"""
        Delete alertfilters in uframe; development helper only to be used during controlled testing.
        """ # Sample Delete response dictionary: {u'message': u'Delete successful.', u'id': 204, u'statusCode': u'OK'}
self
list_of_ids