From: Tomas Babej Date: Sat, 26 Dec 2015 13:59:48 +0000 (+0100) Subject: tests: Expand tests for LazyUUIDTask X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/96fb17929bd52d58a8f760eab98265824ac5dce3?ds=sidebyside tests: Expand tests for LazyUUIDTask --- diff --git a/tasklib/tests.py b/tasklib/tests.py index fc0a1c1..a77058a 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -1118,10 +1118,20 @@ class LazyUUIDTaskTest(TasklibTest): assert self.stored['uuid'] == self.lazy['uuid'] assert type(self.lazy) is LazyUUIDTask - def test_conversion(self): + def test_lazy_explicit_conversion(self): + assert type(self.lazy) is LazyUUIDTask + self.lazy.replace() + assert type(self.lazy) is Task + + def test_conversion_key(self): assert self.stored['description'] == self.lazy['description'] assert type(self.lazy) is Task + def test_conversion_attribute(self): + assert type(self.lazy) is LazyUUIDTask + assert self.lazy.completed is False + assert type(self.lazy) is Task + def test_normal_to_lazy_equality(self): assert self.stored == self.lazy assert type(self.lazy) is LazyUUIDTask @@ -1140,6 +1150,15 @@ class LazyUUIDTaskTest(TasklibTest): assert self.lazy in tasks assert type(self.lazy) is LazyUUIDTask + def test_lazy_saved(self): + assert self.lazy.saved is True + + def test_lazy_modified(self): + assert self.lazy.modified is False + + def test_lazy_modified_fields(self): + assert self.lazy._modified_fields == set() + class LazyUUIDTaskSetTest(TasklibTest):