def test_revert_to_default_marks_document_as_dirty(self): document = FakeDocument() start_revision = document.revision fragment = DocumentFragment( document, None, "value", None, {"default": "value"}) fragment.revert_to_default() self.assertNotEqual(document.revision, start_revision)
def test_revert_to_default_marks_document_as_dirty(self): document = FakeDocument() start_revision = document.revision fragment = DocumentFragment(document, None, "value", None, {"default": "value"}) fragment.revert_to_default() self.assertNotEqual(document.revision, start_revision)
def test_revert_to_default(self): document = FakeDocument() fragment = DocumentFragment( document, None, "value", None, {"default": "value"}) fragment.revert_to_default() self.assertIs(fragment._value, DefaultValue)
def test_revert_to_default(self): document = FakeDocument() fragment = DocumentFragment(document, None, "value", None, {"default": "value"}) fragment.revert_to_default() self.assertIs(fragment._value, DefaultValue)