Skip to content

Commit

Permalink
feat: added apt source field to package
Browse files Browse the repository at this point in the history
  • Loading branch information
RonTamG committed Jan 6, 2024
1 parent 0efe830 commit 292acb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(self, package_data) -> None:
self.architecture = values["Architecture"]
self.maintainer = values["Maintainer"]
self.description = values["Description"]
self.apt_source = None

if "Provides" in values:
package_data = package_data.replace(f"Provides: {values['Provides']}\n", "")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ def test_should_have_a_description():
)


def test_new_package_should_have_a_none_apt_source_field():
package_data = valid_package_data()

package = Package(package_data)

assert package.apt_source is None


def test_should_be_compareable_by_name():
package_1 = Package(valid_package_data())
package_2 = Package(valid_package_data_with_different_name())
Expand Down

0 comments on commit 292acb4

Please sign in to comment.