def test_add_and_remove_endpoint_without_check(self): context = Context('c') endpoint = EndpointMockup('endpoint') context.add_endpoint_without_check(endpoint) self.assert_(endpoint in context.get_endpoints()) self.assert_(endpoint.get_context() is None) endpoint.set_context(context) context.remove_endpoint_without_check(endpoint) self.assert_(not endpoint in context.get_endpoints()) self.assert_(endpoint.get_context() is context)