def test_result_does_not_exist(self):
        rcv = self.F.RunCaseVersionFactory.create()
        env = self.F.EnvironmentFactory.create()
        user = self.F.UserFactory.create()

        self.assertEqual(
            self.result_for(
                rcv,
                user,
                env,
                "{{ result.id }} {{ result.runcaseversion.id }} "
                "{{ result.environment.id }} {{ result.tester.id }}"),
            "None {0} {1} {2}".format(rcv.id, env.id, user.id)
            )
If the result does not exist, a new unsaved one is returned.
dataset/ETHPy150Open mozilla/moztrap/tests/view/runtests/templatetags/test_execution.py/ResultForTest.test_result_does_not_exist