Skip to content

Instantly share code, notes, and snippets.

@amix
Created November 20, 2013 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amix/7564033 to your computer and use it in GitHub Desktop.
Save amix/7564033 to your computer and use it in GitHub Desktop.
@pytest.yield_fixture
def v5_api_data():
with resources.project_ctx() as project, \
resources.item_ctx() as task1, \
resources.item_ctx() as task2, \
resources.item_ctx() as in_history:
with resources.note_ctx(item_id=task1.id) as note_task_1,\
resources.note_ctx(item_id=in_history.id) as note_task_3:
with changeCurrentUserIdContext(resources.user.id):
ItemsModel().setComplete(in_history.id, True, in_history=True)
yield project, task1, task2, in_history, note_task_1, note_task_3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment