def test_observable_to_entity_link(self) -> None:
        """Tests that a link between an observable and an entity can be created."""
        self.relationship = self.observable1.link_to(
            self.entity1, "network-traffic", "Sends network traffic"
        )
        self.assertEqual(self.relationship.source, self.observable1.extended_id)
        self.assertEqual(self.relationship.target, self.entity1.extended_id)
        self.assertEqual(self.relationship.type, "network-traffic")
        self.assertEqual(self.relationship.description, "Sends network traffic")

        vertices, edges, count = self.entity1.neighbors()
        self.assertEqual(len(vertices), 1)
        self.assertEqual(count, 1)
        self.assertEqual(vertices[self.observable1.extended_id].value, "tomchop.me")
Tests that a link between an observable and an entity can be created.
tests/schemas/graph.py