def test_delete_notification(self, fledge_url, name='Test #3'):
    conn = http.client.HTTPConnection(fledge_url)
    conn.request('DELETE', '/fledge/notification/{}'.format(urllib.parse.quote(name)))
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    jdoc = json.loads(r)
    assert ('Notification {} deleted successfully.'.format(name) == jdoc['result'])
    jdoc = _get_result(fledge_url, '/fledge/notification')
    notifications = jdoc['notifications']
    assert (2 == len(notifications))
    assert ('Test 1' == notifications[0]['name'])
    assert ('Test2' == notifications[1]['name'])
    jdoc = _get_result(fledge_url, '/fledge/audit?source=NTFDL')
    assert (1 == jdoc['totalCount'])
def test_delete_notification(self, fledge_url, name='Test #3'):
    conn = http.client.HTTPConnection(fledge_url)
    conn.request('DELETE', '/fledge/notification/{}'.format(urllib.parse.quote(name)))
    r = conn.getresponse()
    assert (200 == r.status)
    r = r.read().decode()
    jdoc = json.loads(r)
    assert ('Notification {} deleted successfully.'.format(name) == jdoc['result'])
    jdoc = _get_result(fledge_url, '/fledge/notification')
    notifications = jdoc['notifications']
    assert (2 == len(notifications))
    assert ('Test 1' == notifications[0]['name'])
    assert ('Test2' == notifications[1]['name'])
    jdoc = _get_result(fledge_url, '/fledge/audit?source=NTFDL')
    assert (1 == jdoc['totalCount'])