So my issue was related to time and the creation of the 2 dependant factories.
Instead of calling create on them straight away, I instead set them up and saved the objects once the plan
relationship had been set. The following works as I need it to;
def setUp(self):
self.user = factories.UserFactory.create()
self.plan = factories.ThePlanFactory.create(
user=self.user
)
self.oldplan = factories.OldPlanFactory()
self.oldplan.plan = self.plan
self.oldplan.save()
self.newplan = factories.NewPlanFactory()
self.newplan.plan = self.plan
self.newplan.save()