diff --git a/tests/kml_test.py b/tests/kml_test.py index 6746087c..e7189417 100644 --- a/tests/kml_test.py +++ b/tests/kml_test.py @@ -501,7 +501,7 @@ def test_snippet(self) -> None: assert "Snippet" not in k.to_string() def test_address(self) -> None: - doc = kml.Document.from_string( + doc = Document.from_string( """ pm-name @@ -512,11 +512,11 @@ def test_address(self) -> None: """, ) - doc2 = kml.Document.from_string(doc.to_string()) + doc2 = Document.from_string(doc.to_string()) assert doc.to_string() == doc2.to_string() def test_phone_number(self) -> None: - doc = kml.Document.from_string( + doc = Document.from_string( """ pm-name @@ -527,7 +527,7 @@ def test_phone_number(self) -> None: """, ) - doc2 = kml.Document.from_string(doc.to_string()) + doc2 = Document.from_string(doc.to_string()) assert doc.to_string() == doc2.to_string() def test_groundoverlay(self) -> None: diff --git a/tests/styles_test.py b/tests/styles_test.py index 2720a9a3..5f932183 100644 --- a/tests/styles_test.py +++ b/tests/styles_test.py @@ -17,7 +17,8 @@ """Test the styles classes.""" import pytest -from fastkml import kml +from fastkml.containers import Document +from fastkml.features import Placemark from fastkml import links from fastkml import styles from fastkml.enums import ColorMode @@ -630,9 +631,9 @@ def test_create_document_style(self) -> None: ], ) - doc = kml.Document(styles=[style]) + doc = Document(styles=[style]) - doc2 = kml.Document() + doc2 = Document() doc2.styles.append(style) expected = """ @@ -648,7 +649,7 @@ def test_create_document_style(self) -> None: """ - doc3 = kml.Document.from_string(expected) + doc3 = Document.from_string(expected) assert doc.to_string() == doc2.to_string() assert doc2.to_string() == doc3.to_string() @@ -665,9 +666,9 @@ def test_create_placemark_style(self) -> None: ], ) - place = kml.Placemark(styles=[style]) + place = Placemark(styles=[style]) - place2 = kml.Placemark() + place2 = Placemark() place2.styles.append(style) expected = """ @@ -682,7 +683,7 @@ def test_create_placemark_style(self) -> None: """ - place3 = kml.Placemark.from_string(expected) + place3 = Placemark.from_string(expected) assert place.to_string() == place2.to_string() assert place2.to_string() == place3.to_string() assert place.to_string() == place3.to_string()