예제 #1
0
    def test_assert_not_logs_fail(self):
        def add_log(self):
            self.node.add_log(NodeLog.UPDATED_FIELDS, {}, auth=self.auth)

        wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS,
                                             'node')(add_log)
        assert_raises(AssertionError, lambda: wrapped(self))
예제 #2
0
    def test_assert_not_logs_pass(self):
        def dont_add_log(self):
            pass

        wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS,
                                             'node')(dont_add_log)
        wrapped(self)
예제 #3
0
    def test_assert_not_logs_fail(self):

        def add_log(self):
            self.node.add_log(NodeLog.UPDATED_FIELDS, {}, auth=self.auth)
        wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS, 'node')(add_log)
        assert_raises(AssertionError, lambda: wrapped(self))
예제 #4
0
    def test_assert_not_logs_pass(self):

        def dont_add_log(self):
            pass
        wrapped = test_utils.assert_not_logs(NodeLog.UPDATED_FIELDS, 'node')(dont_add_log)
        wrapped(self)