Use fields_check() instead of duplicate_or_empty()

This commit is contained in:
RumovZ 2021-06-12 17:34:46 +02:00
parent 9acc03773a
commit ab7c07e830

View file

@ -74,15 +74,15 @@ def test_noteAddDelete():
c0 = note.cards()[0] c0 = note.cards()[0]
assert "three" in c0.q() assert "three" in c0.q()
# it should not be a duplicate # it should not be a duplicate
assert not note.duplicate_or_empty() assert not note.fields_check()
# now let's make a duplicate # now let's make a duplicate
note2 = col.newNote() note2 = col.newNote()
note2["Front"] = "one" note2["Front"] = "one"
note2["Back"] = "" note2["Back"] = ""
assert note2.duplicate_or_empty() assert note2.fields_check()
# empty first field should not be permitted either # empty first field should not be permitted either
note2["Front"] = " " note2["Front"] = " "
assert note2.duplicate_or_empty() assert note2.fields_check()
def test_fieldChecksum(): def test_fieldChecksum():