From 1fa6825859ec169bfcf1b91d7047e4df499aa3e1 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 24 Dec 2015 16:56:32 +0100 Subject: [PATCH] tests: Improve tests for the LazyUUIDTaskSet --- tasklib/tests.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 -- 2.39.5