Coverage for app/backend/src/tests/fixtures/api/__init__.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.18.0, created at 2026-12-03 18:26 +0000

1""" 

2Exposes backend APIs 1-to-1 as functions providing: 

3 

4- Strongly typed parameters 

5- Encapsulation of protobuf encoding boilerplate, e.g. StringWrapper 

6- Neutral parameter defaults so tests only need to be explicit about relevant arguments 

7- Where it avoids boilerplate, convenience functionality such as moderation approval as part of object creation. 

8 

9Backend API integration tests use these functions, 

10so they must map directly to corresponding backend APIs, 

11and avoid direct database manipulation or similar shortcuts. 

12""" 

13 

14# Reexport submodules such that tests can import "api" and then use "api.events.create_event". 

15from . import blocking as blocking 

16from . import communities as communities 

17from . import conversations as conversations 

18from . import discussions as discussions 

19from . import donations as donations 

20from . import events as events 

21from . import galleries as galleries 

22from . import gis as gis 

23from . import groups as groups 

24from . import notifications as notifications 

25from . import references as references 

26from . import reporting as reporting 

27from . import resources as resources 

28from . import threads as threads