Skip to content

Commit

Permalink
support previous_vendor_id attribute on System model
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs committed Nov 6, 2023
1 parent f5ab584 commit 1937c91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,9 @@ class System(FidesModel):
vendor_id: Optional[str] = Field(
description="The unique identifier for the vendor that's associated with this system."
)
previous_vendor_id: Optional[str] = Field(
description="If specified, the unique identifier for the vendor that was previously associated with this system."
)
dataset_references: List[FidesKey] = Field(
default_factory=list,
description="Referenced Dataset fides keys used by the system.",
Expand Down
9 changes: 7 additions & 2 deletions tests/fideslang/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def test_privacy_declaration_data_qualifier_deprecation(self) -> None:


class TestSystem:
# TODO: these tests are not effectively evaluating whether the provided constructor args
# are actually supported, because our `System` model does not prohibit "extra" fields.
# We need to update these tests to assert that the provided args are actually being set
# as attributes on the System instance that's instantiated.
def test_system_valid(self) -> None:
assert System(
description="Test Policy",
Expand Down Expand Up @@ -390,13 +394,14 @@ def test_expanded_system(self):
data_shared_with_third_parties=True,
third_parties="advertising; marketing",
shared_categories=[],
flexible_legal_basis_for_processing=True,
cookies=[
{"name": "ANON_ID", "path": "/", "domain": "tribalfusion.com"}
],
)
],
third_country_transfers=["ARM"],
vendor_id="1",
vendor_id="gvl.1",
dataset_references=["test_fides_key_dataset"],
processes_personal_data=True,
exempt_from_privacy_regulations=False,
Expand All @@ -419,7 +424,7 @@ def test_expanded_system(self):
cookie_refresh=True,
uses_non_cookie_access=True,
legitimate_interest_disclosure_url="http://www.example.com/legitimate_interest_disclosure",
flexible_legal_basis_for_processing=True,
previous_vendor_id="gacp.10",
cookies=[
{
"name": "COOKIE_ID_EXAMPLE",
Expand Down

0 comments on commit 1937c91

Please sign in to comment.