Skip to content

Commit

Permalink
Add support for component's priority attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
m-aciek committed Sep 7, 2023
1 parent c83a9a5 commit 66087a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions wlc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ class Component(LazyObject, RepoObjectMixin):
"source_language",
"priority",
"is_glossary",
"category",
)
OPTIONALS: ClassVar[Set[str]] = {"source_language", "is_glossary"}
ID: ClassVar[str] = "slug"
Expand Down
1 change: 1 addition & 0 deletions wlc/test_data/api/components-hello-weblate
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"branch": "main",
"category": "http://127.0.0.1:8000/api/categories/1/",
"file_format": "po",
"filemask": "po/*.po",
"git_export": "",
Expand Down
2 changes: 2 additions & 0 deletions wlc/test_wlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def check_object(self, obj):
"""Perform verification whether object is valid."""
self.assertEqual(obj.name, "Weblate")
self.assertEqual(obj.priority, 100)
self.assertEqual(obj.category, "http://127.0.0.1:8000/api/categories/1/")

def check_list(self, obj):
"""Perform verification whether listing is valid."""
Expand Down Expand Up @@ -486,6 +487,7 @@ def test_keys(self):
obj.keys(),
[
"branch",
"category",
"file_format",
"filemask",
"git_export",
Expand Down

0 comments on commit 66087a7

Please sign in to comment.