def test_create_caseversion_existing_suite(self):

        # need a suite to exist, so the import can find it.
        suite = self.model.Suite.objects.create(
            name="FooSuite",
            product=self.pv.product,
            )

        result = self.import_data({
            "cases": [{
                "name": "Foo",
                "steps": [{"instruction": "do this"}],
                "suites": ["FooSuite"],
                }]
            }
        )

        cv = self.model.CaseVersion.objects.get()
        self.assertEqual(cv.case.suites.get(), suite)
        self.assertEqual(result.num_cases, 1)
        self.assertEqual(result.num_suites, 0)
A case that uses an existing suite.
dataset/ETHPy150Open mozilla/moztrap/tests/model/library/test_importer.py/ImporterTest.test_create_caseversion_existing_suite