def test_resource_exists(self): repos = Resource('repository', REPOS_NAME) self.assertEqual(True, resource_exists(self.env, repos)) self.assertEqual(False, resource_exists(self.env, repos(id='xxx'))) node = repos.child('source', u'tĂȘte') self.assertEqual(True, resource_exists(self.env, node)) self.assertEqual(False, resource_exists(self.env, node(id='xxx'))) cset = repos.child('changeset', HEAD) self.assertEqual(True, resource_exists(self.env, cset)) self.assertEqual(False, resource_exists(self.env, cset(id=123456)))