def test_new_export(self):
        """Tests that new exports can be created."""
        response = client.post(
            "/api/v2/tasks/export/new",
            json={
                "export": {
                    "name": "RandomExport2",
                    "acts_on": ["hostname"],
                    "template_name": "RandomTemplate",
                }
            },
        )
        data = response.json()
        self.assertEqual(data["acts_on"], ["hostname"])
        self.assertEqual(data["name"], "RandomExport2")
        self.assertEqual(data["template_name"], "RandomTemplate")
Tests that new exports can be created.
tests/apiv2/tasks.py