From: Tomas Babej Date: Thu, 24 Dec 2015 15:56:32 +0000 (+0100) Subject: tests: Improve tests for the LazyUUIDTaskSet X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/1fa6825859ec169bfcf1b91d7047e4df499aa3e1?ds=sidebyside tests: Improve tests for the LazyUUIDTaskSet --- diff --git a/tasklib/tests.py b/tasklib/tests.py index 48007ea..fc0a1c1 100644 --- a/tasklib/tests.py +++ b/tasklib/tests.py @@ -1172,10 +1172,15 @@ class LazyUUIDTaskSetTest(TasklibTest): assert self.task3 in self.lazy assert type(self.lazy) is LazyUUIDTaskSet - def test_eq(self): - assert self.lazy == self.tw.tasks.all() + def test_eq_lazy(self): + new_lazy = LazyUUIDTaskSet(self.tw, self.uuids) + assert self.lazy == new_lazy + assert not self.lazy != new_lazy assert type(self.lazy) is LazyUUIDTaskSet - def test_conversion(self): - assert set(self.lazy) == set(self.tw.tasks.all()) - assert type(self.lazy) is TaskQuerySet + def test_eq_real(self): + assert self.lazy == self.tw.tasks.all() + assert self.tw.tasks.all() == self.lazy + assert not self.lazy != self.tw.tasks.all() + + assert type(self.lazy) is LazyUUIDTaskSet