Project

General

Profile

Bug #2179

tissue_robots cannot be re-used in selftests

Added by Lauri Carpenter over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Start date:
11/18/2011
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Tissue robots initialize themselves with their robot_agent when the instance is CREATED. Tissue robots are singletons. Therefore, the agent that is given to a robot is constant for the life of the entire PROCESS running the test, not just the unit test where it was used.

IF a python module uses tissue robots in MORE THAN ONE unit test, the agent from the FIRST test has a PK that will not exist by the time the second test is run (because of the setUp and loadTestData initialization of the database).

Fix the tissue_robots so that any database activity happens in the RUN phase, not the INIT phase. This allows the robot to obtain a different agent for each unit test.

History

#1 Updated by Lauri Carpenter over 8 years ago

  • Status changed from New to Resolved

#2 Updated by Lauri Carpenter about 8 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF