square-administration 3.0.2__py3-none-any.whl → 3.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: square-administration
3
- Version: 3.0.2
3
+ Version: 3.1.0
4
4
  Summary: common business layer for my personal server.
5
5
  Home-page: https://github.com/thepmsquare/square_administration
6
6
  Author: thePmSquare
@@ -18,6 +18,8 @@ Requires-Dist: fastapi>=0.104.1
18
18
  Requires-Dist: pydantic>=2.5.3
19
19
  Requires-Dist: requests>=2.32.3
20
20
  Requires-Dist: bcrypt>=4.2.0
21
+ Requires-Dist: pytest>=8.0.0
22
+ Requires-Dist: httpx>=0.27.2
21
23
  Requires-Dist: square-commons>=1.0.0
22
24
  Requires-Dist: square-logger>=1.0.0
23
25
  Requires-Dist: square-database-helper>=2.0.0
@@ -42,6 +44,11 @@ pip install square_administration
42
44
 
43
45
  ## changelog
44
46
 
47
+ ### v3.1.0
48
+
49
+ - add pytest as dependency.
50
+ - add dummy test case.
51
+
45
52
  ### v3.0.2
46
53
 
47
54
  - update logic to get usernames for non-anonymous greetings in get_all_greetings_v0.
@@ -11,7 +11,10 @@ square_administration/routes/authentication.py,sha256=vOkuAmnPkTl-PSDmSkyui2tvhF
11
11
  square_administration/routes/core.py,sha256=lKI1yAZG4LYKk-Z0pgdFwKW3wSl0ArziTylEKvp4DD0,5233
12
12
  square_administration/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  square_administration/utils/common.py,sha256=Uk2clDugVI8U6-bgjs77fxC4DuqmJEJ_IznBs1jAtWc,350
14
- square_administration-3.0.2.dist-info/METADATA,sha256=-XTGMZZBJeQknNJvEJwkJFTiQ8JvcBkgJs1-vWM56tY,2321
15
- square_administration-3.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
16
- square_administration-3.0.2.dist-info/top_level.txt,sha256=8WFipDrMQUPRDo5AvipxU1YK3wZtWZyCUMWaR416zAw,22
17
- square_administration-3.0.2.dist-info/RECORD,,
14
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ tests/conftest.py,sha256=WU4jzo4E6M0E2U-DkrnUAwlW8G54DmNS4KydLceDhiU,446
16
+ tests/test_1.py,sha256=TKBO9xomDrIGJMKoBQsPK6TrJtAZp9aYv-d-SQNzgPA,479
17
+ square_administration-3.1.0.dist-info/METADATA,sha256=b8vram0yxkRiAGxCxRmHTcuD-al-SIWadZ0-CoQNOww,2443
18
+ square_administration-3.1.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
19
+ square_administration-3.1.0.dist-info/top_level.txt,sha256=tyroqpdXXQAiA7Y_V1wCqPPt6nnS_orcY9txLeHjm1s,28
20
+ square_administration-3.1.0.dist-info/RECORD,,
tests/__init__.py ADDED
File without changes
tests/conftest.py ADDED
@@ -0,0 +1,11 @@
1
+ import pytest
2
+
3
+
4
+ @pytest.fixture
5
+ def set_env(monkeypatch):
6
+ monkeypatch.setenv("SQUARE_DATABASE_PROTOCOL", "http")
7
+ monkeypatch.setenv("SQUARE_DATABASE_IP", "raspi.thepmsquare.com")
8
+ monkeypatch.setenv("SQUARE_DATABASE_PORT", "20010")
9
+ monkeypatch.setenv("SQUARE_AUTHENTICATION_PROTOCOL", "http")
10
+ monkeypatch.setenv("SQUARE_AUTHENTICATION_IP", "raspi.thepmsquare.com")
11
+ monkeypatch.setenv("SQUARE_AUTHENTICATION_PORT", "20011")
tests/test_1.py ADDED
@@ -0,0 +1,16 @@
1
+ from fastapi.testclient import TestClient
2
+ from square_commons import get_api_output_in_standard_format
3
+
4
+
5
+ def test_read_main(set_env):
6
+ from square_administration.configuration import config_str_module_name
7
+ from square_administration.main import (
8
+ app,
9
+ )
10
+
11
+ client = TestClient(app)
12
+ response = client.get("/")
13
+ assert response.status_code == 200
14
+ assert response.json() == get_api_output_in_standard_format(
15
+ log=config_str_module_name
16
+ )