Ejemplo n.º 1
0
def test_code_turned_off():
    config = Configuration()
    config.send_code = False
    notification = Notification(Exception("oops"), config, {}, traceback=fixtures.end_of_file[2])

    payload = notification._payload()


    code = payload['events'][0]['exceptions'][0]['stacktrace'][0]['code']
    assert(None == code)
    def test_code_turned_off(self):
        config = Configuration()
        config.send_code = False
        notification = Notification(Exception("oops"), config, {},
                                    traceback=fixtures.end_of_file[2])

        payload = json.loads(notification._payload())

        code = payload['events'][0]['exceptions'][0]['stacktrace'][0]['code']
        self.assertEqual(code, None)
Ejemplo n.º 3
0
def test_code_turned_off():
    config = Configuration()
    config.send_code = False
    notification = Notification(Exception("oops"),
                                config, {},
                                traceback=fixtures.end_of_file[2])

    payload = notification._payload()

    code = payload['events'][0]['exceptions'][0]['stacktrace'][0]['code']
    assert (None == code)