equal
deleted
inserted
replaced
399 |
399 |
400 def test_count_users_by_date(self): |
400 def test_count_users_by_date(self): |
401 rset = self.execute('Any D, COUNT(U) GROUPBY D WHERE U is CWUser, U creation_date D') |
401 rset = self.execute('Any D, COUNT(U) GROUPBY D WHERE U is CWUser, U creation_date D') |
402 self.assertEquals(rset.related_entity(0,0), (None, None)) |
402 self.assertEquals(rset.related_entity(0,0), (None, None)) |
403 |
403 |
|
404 def test_str(self): |
|
405 rset = self.execute('(Any X,N WHERE X is CWGroup, X name N)') |
|
406 self.assertIsInstance(str(rset), basestring) |
|
407 self.assertEquals(len(str(rset).splitlines()), 1) |
|
408 |
|
409 def test_repr(self): |
|
410 rset = self.execute('(Any X,N WHERE X is CWGroup, X name N)') |
|
411 self.assertIsInstance(repr(rset), basestring) |
|
412 self.assertTrue(len(repr(rset).splitlines()) > 1) |
|
413 |
|
414 rset = self.execute('(Any X WHERE X is CWGroup, X name "managers")') |
|
415 self.assertIsInstance(str(rset), basestring) |
|
416 self.assertEquals(len(str(rset).splitlines()), 1) |
|
417 |
404 if __name__ == '__main__': |
418 if __name__ == '__main__': |
405 unittest_main() |
419 unittest_main() |