add tests for local_context