def test_is_ok_with_all_snapshot_all_computing_error(self):
        """
        2 snapshots, all have computing errors
        Result is undefined, we return None
        """
        tcs = TestCaseInSession.objects.get(pk=10)
        st1 = StepResult.objects.get(pk=12)
        st2 = StepResult.objects.get(pk=13)
        initial_ref_snapshot = Snapshot.objects.get(id=1)
        s1 = Snapshot(stepResult=st1,
                      refSnapshot=initial_ref_snapshot,
                      pixelsDiff=None)
        s1.computingError = 'some error'
        s1.save()
        s2 = Snapshot(stepResult=st2,
                      refSnapshot=initial_ref_snapshot,
                      pixelsDiff=None)
        s2.computingError = 'some error'
        s2.save()

        self.assertIsNone(tcs.isOkWithSnapshots())
    def test_is_ok_with_all_snapshot_ko_and_one_computing_error(self):
        """
        2 snapshots whose one has computing error, other is ko
        Result is ko, we return False
        """
        tcs = TestCaseInSession.objects.get(pk=10)
        st1 = StepResult.objects.get(pk=12)
        st2 = StepResult.objects.get(pk=13)
        initial_ref_snapshot = Snapshot.objects.get(id=1)
        s1 = Snapshot(stepResult=st1,
                      refSnapshot=initial_ref_snapshot,
                      pixelsDiff=pickle.dumps([(1, 1)]))
        s1.save()
        s2 = Snapshot(stepResult=st2,
                      refSnapshot=initial_ref_snapshot,
                      pixelsDiff=None)
        s2.computingError = 'some error'
        s2.save()

        self.assertFalse(tcs.isOkWithSnapshots())