backo 0.3.3__tar.gz → 0.3.4__tar.gz
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.
- {backo-0.3.3 → backo-0.3.4}/CHANGELOG.md +4 -0
- {backo-0.3.3 → backo-0.3.4}/PKG-INFO +17 -6
- {backo-0.3.3 → backo-0.3.4}/README.md +16 -5
- {backo-0.3.3 → backo-0.3.4}/backo/collection.py +16 -3
- {backo-0.3.3 → backo-0.3.4}/pyproject.toml +1 -1
- {backo-0.3.3 → backo-0.3.4}/tests/test_routes.py +33 -4
- {backo-0.3.3 → backo-0.3.4}/uv.lock +1 -1
- {backo-0.3.3 → backo-0.3.4}/.coveragerc +0 -0
- {backo-0.3.3 → backo-0.3.4}/.github/workflows/pylint.yml +0 -0
- {backo-0.3.3 → backo-0.3.4}/.github/workflows/release.yml +0 -0
- {backo-0.3.3 → backo-0.3.4}/.github/workflows/test.yml +0 -0
- {backo-0.3.3 → backo-0.3.4}/.github/workflows/test_examples.yml +0 -0
- {backo-0.3.3 → backo-0.3.4}/.gitignore +0 -0
- {backo-0.3.3 → backo-0.3.4}/.pylintrc +0 -0
- {backo-0.3.3 → backo-0.3.4}/.readthedocs.yaml +0 -0
- {backo-0.3.3 → backo-0.3.4}/CONTRIBUTING.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/LICENSE +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/action.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/api_toolbox.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/backoffice.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/collection_addon.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/current_user.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/backo_redirect.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/generic/db_handler.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/generic/filter.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/generic/interface.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/generic/transformer.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/memory.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/mongo.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/restfull.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/sqlite3/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/sqlite3/db_handler.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/sqlite3/filter.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/sqlite3/pragma.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/sqlite3/transformers.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/valkeydb.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/yml.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/db/yml_dir.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/error.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/file/blob_file.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/file/file.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/file/file_blob_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/file/file_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/file/file_system_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/initialisation/init_script.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/initialisation/templates/__init__.pytemplate +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/initialisation/templates/backoffice.pytemplate +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/initialisation/templates/collection.pytemplate +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/item.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/log.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/loop_path.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/meta_data_handler.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/migration_report.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/openapi.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/patch.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/ref.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/refs_strategies.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/refslist.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/request_decorators.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/selection.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/status.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/backo/transaction.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/Makefile +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/make.bat +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/requirements.txt +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/DB_management.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/api_reference.rst +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/conf.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/errors.rst +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/index.rst +0 -0
- {backo-0.3.3 → backo-0.3.4}/docs/source/readme.rst +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/README.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/backoffice.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/collections_set/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/collections_set/books.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/collections_set/users.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/migration.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/media_library/tests.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/README.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/backoffice.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/collections_set/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/collections_set/countries.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/collections_set/db_country_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/collections_set/people.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/nationality/tests.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/README.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/backoffice.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/collections_set/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/collections_set/users.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/collections_set/vms.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/collections_set/vms_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/config.yaml +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/constants.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/requirements.txt +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/README.md +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/collections_set/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/collections_set/vms.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/config.yaml +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/constants.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/rest_api.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/requirements.txt +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/__init__.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_action.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_api_toolbox.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_crud.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_current_user.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_db_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_file.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_log.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_meta.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_migrations.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_mongo.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_openapi.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_reference.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_rest_api_connector.py +0 -0
- {backo-0.3.3 → backo-0.3.4}/tests/test_selections.py +0 -0
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.3.4] 2026-09-04
|
|
9
|
+
|
|
10
|
+
* fix : total routes bug fix
|
|
11
|
+
*
|
|
8
12
|
## [0.3.3] 2026-09-04
|
|
9
13
|
|
|
10
14
|
* fix : Error on release 0.3.1 and 0.3.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: backo
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Back office low code
|
|
5
5
|
Project-URL: GitHub, https://github.com/backo-stricto/backo
|
|
6
6
|
Project-URL: Homepage, https://github.com/backo-stricto/backo
|
|
@@ -614,11 +614,17 @@ And to call the selection...
|
|
|
614
614
|
```bash
|
|
615
615
|
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed'
|
|
616
616
|
'{"result": [
|
|
617
|
-
["666", "Docker
|
|
617
|
+
["666", "Docker as BDSM toy", "Wallrich"],
|
|
618
618
|
["1234", "Martine chez Epstein", "Lang"]
|
|
619
619
|
],
|
|
620
|
-
"total":
|
|
620
|
+
"total": None, "_skip": 0, "_page": 10}'
|
|
621
621
|
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?title.$reg=Martine'
|
|
622
|
+
|
|
623
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?_total=1'
|
|
624
|
+
'{ "total" : 2 }'
|
|
625
|
+
# or
|
|
626
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed'
|
|
627
|
+
'{ "total" : 2 }'
|
|
622
628
|
```
|
|
623
629
|
|
|
624
630
|
|
|
@@ -872,6 +878,7 @@ Get a list of objects matching the query string. The query string can be with th
|
|
|
872
878
|
| \_view | string | "client" | selects the view ([stricto views](https://github.com/backo-stricto/stricto?tab=readme-ov-file#views)) |
|
|
873
879
|
| \_page | int | - | sets the desired number of items per page in paginated data presentation |
|
|
874
880
|
| \_skip | int | - | skips the n-first items of the result list in paginated data presentation. |
|
|
881
|
+
| \_total | whatyouwant | None | Just compute the total of object and return { 'total' : x } without taking pagination in account |
|
|
875
882
|
|
|
876
883
|
|
|
877
884
|
The request returns a HTTP status `200` with that JSON object:
|
|
@@ -879,7 +886,6 @@ The request returns a HTTP status `200` with that JSON object:
|
|
|
879
886
|
```python
|
|
880
887
|
{
|
|
881
888
|
"result": # list of dict containing objects matched
|
|
882
|
-
"total": # (int) total number of object matched
|
|
883
889
|
"_view": # the _view given in the request
|
|
884
890
|
"_skip": # the _skip given in the request
|
|
885
891
|
"_page": # the _page given in the request
|
|
@@ -1037,10 +1043,15 @@ curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed'
|
|
|
1037
1043
|
],
|
|
1038
1044
|
"total": None, "_skip": 0, "_page": 10}'
|
|
1039
1045
|
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed'
|
|
1040
|
-
'2'
|
|
1046
|
+
'{ "total" : 2 }'
|
|
1047
|
+
# or
|
|
1048
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?_total=1'
|
|
1049
|
+
'{ "total" : 2 }'
|
|
1041
1050
|
|
|
1042
1051
|
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed?title.$reg=Dock'
|
|
1043
|
-
'1'
|
|
1052
|
+
'{ "total" : 1 }'
|
|
1053
|
+
# or
|
|
1054
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?title.$reg=Dock&_total=1'
|
|
1044
1055
|
```
|
|
1045
1056
|
|
|
1046
1057
|
|
|
@@ -566,11 +566,17 @@ And to call the selection...
|
|
|
566
566
|
```bash
|
|
567
567
|
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed'
|
|
568
568
|
'{"result": [
|
|
569
|
-
["666", "Docker
|
|
569
|
+
["666", "Docker as BDSM toy", "Wallrich"],
|
|
570
570
|
["1234", "Martine chez Epstein", "Lang"]
|
|
571
571
|
],
|
|
572
|
-
"total":
|
|
572
|
+
"total": None, "_skip": 0, "_page": 10}'
|
|
573
573
|
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?title.$reg=Martine'
|
|
574
|
+
|
|
575
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?_total=1'
|
|
576
|
+
'{ "total" : 2 }'
|
|
577
|
+
# or
|
|
578
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed'
|
|
579
|
+
'{ "total" : 2 }'
|
|
574
580
|
```
|
|
575
581
|
|
|
576
582
|
|
|
@@ -824,6 +830,7 @@ Get a list of objects matching the query string. The query string can be with th
|
|
|
824
830
|
| \_view | string | "client" | selects the view ([stricto views](https://github.com/backo-stricto/stricto?tab=readme-ov-file#views)) |
|
|
825
831
|
| \_page | int | - | sets the desired number of items per page in paginated data presentation |
|
|
826
832
|
| \_skip | int | - | skips the n-first items of the result list in paginated data presentation. |
|
|
833
|
+
| \_total | whatyouwant | None | Just compute the total of object and return { 'total' : x } without taking pagination in account |
|
|
827
834
|
|
|
828
835
|
|
|
829
836
|
The request returns a HTTP status `200` with that JSON object:
|
|
@@ -831,7 +838,6 @@ The request returns a HTTP status `200` with that JSON object:
|
|
|
831
838
|
```python
|
|
832
839
|
{
|
|
833
840
|
"result": # list of dict containing objects matched
|
|
834
|
-
"total": # (int) total number of object matched
|
|
835
841
|
"_view": # the _view given in the request
|
|
836
842
|
"_skip": # the _skip given in the request
|
|
837
843
|
"_page": # the _page given in the request
|
|
@@ -989,10 +995,15 @@ curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed'
|
|
|
989
995
|
],
|
|
990
996
|
"total": None, "_skip": 0, "_page": 10}'
|
|
991
997
|
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed'
|
|
992
|
-
'2'
|
|
998
|
+
'{ "total" : 2 }'
|
|
999
|
+
# or
|
|
1000
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?_total=1'
|
|
1001
|
+
'{ "total" : 2 }'
|
|
993
1002
|
|
|
994
1003
|
curl -X GET 'http://localhost/media_library/coll/books/_selections_total/borrowed?title.$reg=Dock'
|
|
995
|
-
'1'
|
|
1004
|
+
'{ "total" : 1 }'
|
|
1005
|
+
# or
|
|
1006
|
+
curl -X GET 'http://localhost/media_library/coll/books/_selections/borrowed?title.$reg=Dock&_total=1'
|
|
996
1007
|
```
|
|
997
1008
|
|
|
998
1009
|
|
|
@@ -869,6 +869,10 @@ class Collection:
|
|
|
869
869
|
query = request.args
|
|
870
870
|
_page = int(query.get("_page", 10))
|
|
871
871
|
_skip = int(query.get("_skip", 0))
|
|
872
|
+
_total = query.get("_total")
|
|
873
|
+
|
|
874
|
+
if _total:
|
|
875
|
+
return self.do_count("_all")
|
|
872
876
|
|
|
873
877
|
match_filter: SFilter = multidict_to_sfilter(query)
|
|
874
878
|
|
|
@@ -901,6 +905,10 @@ class Collection:
|
|
|
901
905
|
query = request.args
|
|
902
906
|
_page = int(query.get("_page", 10))
|
|
903
907
|
_skip = int(query.get("_skip", 0))
|
|
908
|
+
_total = query.get("_total")
|
|
909
|
+
|
|
910
|
+
if _total:
|
|
911
|
+
return self.do_count(_selection_name)
|
|
904
912
|
|
|
905
913
|
match_filter: SFilter = multidict_to_sfilter(query)
|
|
906
914
|
|
|
@@ -934,7 +942,7 @@ class Collection:
|
|
|
934
942
|
count = self._selections[_selection_name].count(match_filter)
|
|
935
943
|
|
|
936
944
|
log.debug(f"count in {self.name}/{_selection_name} {match_filter} -> {count}")
|
|
937
|
-
return (count, 200)
|
|
945
|
+
return ({"total": count}, 200)
|
|
938
946
|
|
|
939
947
|
@check_content_type
|
|
940
948
|
@error_to_http_handler
|
|
@@ -960,6 +968,11 @@ class Collection:
|
|
|
960
968
|
_page = int(query.get("_page", 10))
|
|
961
969
|
_skip = int(query.get("_skip", 0))
|
|
962
970
|
|
|
971
|
+
_total = query.get("_total")
|
|
972
|
+
|
|
973
|
+
if _total:
|
|
974
|
+
return self.do_post_count(_selection_name)
|
|
975
|
+
|
|
963
976
|
match_filter: SFilter = dict_to_sfilter(request_content)
|
|
964
977
|
result = self._selections[_selection_name].select(match_filter, _page, _skip)
|
|
965
978
|
|
|
@@ -990,11 +1003,11 @@ class Collection:
|
|
|
990
1003
|
log.debug(f"http post selection {_selection_name} content {request_content}")
|
|
991
1004
|
|
|
992
1005
|
match_filter: SFilter = dict_to_sfilter(request_content)
|
|
993
|
-
count = self._selections[_selection_name].
|
|
1006
|
+
count = self._selections[_selection_name].count(match_filter)
|
|
994
1007
|
|
|
995
1008
|
log.debug(f"count in {self.name}/{_selection_name} {match_filter} -> {count}")
|
|
996
1009
|
|
|
997
|
-
return (count, 200)
|
|
1010
|
+
return ({"total": count}, 200)
|
|
998
1011
|
|
|
999
1012
|
@check_content_type
|
|
1000
1013
|
@error_to_http_handler
|
|
@@ -269,6 +269,11 @@ class TestRoutes(unittest.TestCase):
|
|
|
269
269
|
l = self.backo.users.set(results["result"])
|
|
270
270
|
self.assertEqual(len(l), 1)
|
|
271
271
|
|
|
272
|
+
response = self.client.get("/myApp/users?name=bert1&_total=True")
|
|
273
|
+
self.assertEqual(response.status_code, 200)
|
|
274
|
+
results = json.loads(response.data)
|
|
275
|
+
self.assertEqual(results["total"], 1)
|
|
276
|
+
|
|
272
277
|
def test_select_route_filter_1(self):
|
|
273
278
|
"""
|
|
274
279
|
do a select
|
|
@@ -305,16 +310,26 @@ class TestRoutes(unittest.TestCase):
|
|
|
305
310
|
"""
|
|
306
311
|
do a select on a selection
|
|
307
312
|
"""
|
|
308
|
-
# response = self.client.get("/myApp/users/_selections/bert_only")
|
|
309
|
-
# self.assertEqual(response.status_code, 200)
|
|
310
|
-
# results = json.loads(response.data)
|
|
311
|
-
# self.assertEqual(results["total"], 2)
|
|
312
313
|
response = self.client.get("/myApp/users/_selections/bert_only?name.$reg=.*1")
|
|
313
314
|
self.assertEqual(response.status_code, 200)
|
|
314
315
|
results = json.loads(response.data)
|
|
315
316
|
self.assertEqual(results["total"], None)
|
|
316
317
|
self.assertEqual(len(results["result"]), 1)
|
|
317
318
|
|
|
319
|
+
response = self.client.get(
|
|
320
|
+
"/myApp/users/_selections_total/bert_only?name.$reg=.*1"
|
|
321
|
+
)
|
|
322
|
+
self.assertEqual(response.status_code, 200)
|
|
323
|
+
results = json.loads(response.data)
|
|
324
|
+
self.assertEqual(results["total"], 1)
|
|
325
|
+
|
|
326
|
+
response = self.client.get(
|
|
327
|
+
"/myApp/users/_selections/bert_only?name.$reg=.*1&_total=1"
|
|
328
|
+
)
|
|
329
|
+
self.assertEqual(response.status_code, 200)
|
|
330
|
+
results = json.loads(response.data)
|
|
331
|
+
self.assertEqual(results["total"], 1)
|
|
332
|
+
|
|
318
333
|
def test_select_route_filter_post(self):
|
|
319
334
|
"""
|
|
320
335
|
do a select on a selection with a post
|
|
@@ -332,6 +347,20 @@ class TestRoutes(unittest.TestCase):
|
|
|
332
347
|
self.assertEqual(results["total"], None)
|
|
333
348
|
self.assertEqual(len(results["result"]), 1)
|
|
334
349
|
|
|
350
|
+
response = self.client.post(
|
|
351
|
+
"/myApp/users/_selections_total/bert_only", json={"$.name.$reg": ".*1"}
|
|
352
|
+
)
|
|
353
|
+
self.assertEqual(response.status_code, 200)
|
|
354
|
+
results = json.loads(response.data)
|
|
355
|
+
self.assertEqual(results["total"], 1)
|
|
356
|
+
|
|
357
|
+
response = self.client.post(
|
|
358
|
+
"/myApp/users/_selections/bert_only?_total=1", json={"$.name.$reg": ".*1"}
|
|
359
|
+
)
|
|
360
|
+
self.assertEqual(response.status_code, 200)
|
|
361
|
+
results = json.loads(response.data)
|
|
362
|
+
self.assertEqual(results["total"], 1)
|
|
363
|
+
|
|
335
364
|
def test_check_route_filter(self):
|
|
336
365
|
"""
|
|
337
366
|
do a check
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{backo-0.3.3 → backo-0.3.4}/examples/rest_api_connector/rest-api/collections_set/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|