def test_match_known_observables_have_tags(self):
        """Tests that observables have all tags."""
        response = client.post(
            "/api/v2/graph/match",
            json={"observables": ["test1.com"], "add_unknown": False},
        )
        data = response.json()
        self.assertEqual(response.status_code, 200, data)

        # Observable is known, has been added.
        self.assertEqual(len(data["known"]), 1)
        self.assertEqual(data["known"][0]["value"], "test1.com")
        self.assertEqual(
            sorted([tag["name"] for tag in data["known"][0]["tags"]]), ["tag1", "tag2"]
        )
Tests that observables have all tags.
tests/apiv2/graph.py