diff --git a/wlc/__init__.py b/wlc/__init__.py index be24263..ae665b8 100644 --- a/wlc/__init__.py +++ b/wlc/__init__.py @@ -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" diff --git a/wlc/test_data/api/components-hello-weblate b/wlc/test_data/api/components-hello-weblate index 9577ec4..db0016f 100644 --- a/wlc/test_data/api/components-hello-weblate +++ b/wlc/test_data/api/components-hello-weblate @@ -1,5 +1,6 @@ { "branch": "main", + "category": "http://127.0.0.1:8000/api/categories/1/", "file_format": "po", "filemask": "po/*.po", "git_export": "", diff --git a/wlc/test_wlc.py b/wlc/test_wlc.py index 39fa22c..cb0c3e4 100644 --- a/wlc/test_wlc.py +++ b/wlc/test_wlc.py @@ -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.""" @@ -486,6 +487,7 @@ def test_keys(self): obj.keys(), [ "branch", + "category", "file_format", "filemask", "git_export",