@@ -20,26 +20,28 @@ def test_index_search_result_with_two_folders(requests_mock):
20
20
sq = Search (Index ).query ('my document' )
21
21
22
22
json_response = {
23
- "numFound" : 1 ,
24
- "start" : 0 ,
25
- "numFoundExact" : True ,
26
-
27
- "docs" : [
28
- {
29
- "id" : "0b663599-32b1-4396-8dbe-ae7cd327cec6" , # noqa
30
- "lang" : "en" ,
31
- "title_txt_en" : "My Documents" ,
32
- "entity_type" : "folder" ,
33
- "_version_" : 1774301885457498112
34
- },
35
- {
36
- "id" : "1c773599-32b1-4396-8dbe-ae7cd327cec6" , # noqa
37
- "lang" : "en" ,
38
- "title_txt_en" : ".inbox" ,
39
- "entity_type" : "folder" ,
40
- "_version_" : 1774301885457498112
41
- }
42
- ]
23
+ "response" : {
24
+ "numFound" : 1 ,
25
+ "start" : 0 ,
26
+ "numFoundExact" : True ,
27
+
28
+ "docs" : [
29
+ {
30
+ "id" : "0b663599-32b1-4396-8dbe-ae7cd327cec6" , # noqa
31
+ "lang" : "en" ,
32
+ "title_txt_en" : "My Documents" ,
33
+ "entity_type" : "folder" ,
34
+ "_version_" : 1774301885457498112
35
+ },
36
+ {
37
+ "id" : "1c773599-32b1-4396-8dbe-ae7cd327cec6" , # noqa
38
+ "lang" : "en" ,
39
+ "title_txt_en" : ".inbox" ,
40
+ "entity_type" : "folder" ,
41
+ "_version_" : 1774301885457498112
42
+ }
43
+ ]
44
+ }
43
45
}
44
46
45
47
requests_mock .get (
@@ -71,45 +73,47 @@ def test_index_search_result_with_folders_and_documents(requests_mock):
71
73
sq = Search (Index ).query ('my document' )
72
74
73
75
json_response = {
74
- "numFound" : 1 ,
75
- "start" : 0 ,
76
- "numFoundExact" : True ,
77
- "docs" : [
78
- {
79
- "id" : "0b663599-32b1-4396-8dbe-ae7cd327cec6" ,
80
- "lang" : "en" ,
81
- "title_txt_en" : "My Documents" ,
82
- "entity_type" : "folder" ,
83
- "_version_" : 1774301885457498112
84
- },
85
- {
86
- "id" : "1c773599-32b1-4396-8dbe-ae7cd327cec6" ,
87
- "lang" : "en" ,
88
- "title_txt_en" : ".inbox" ,
89
- "entity_type" : "folder" ,
90
- "_version_" : 1774301885457498112
91
- },
92
- {
93
- "id" : "a6e4916f-dea6-414b-aa38-f5b9ea375725" ,
94
- "document_id" : "9bc57688-302e-4e1f-840a-c747dcccb362" ,
95
- "lang" : "en" ,
96
- "user_id" : "4cee7c39-7c34-4cc5-8543-42a8c88c9fe6" ,
97
- "page_number" : 1 ,
98
- "entity_type" : "page" ,
99
- "title_txt_en" : "brother_004603.pdf" ,
100
- "_version_" : 1801539996374532096
101
- },
102
- {
103
- "id" : "72f6ca9e-af4b-4235-a56c-a62508e24efe" , # noqa
104
- "document_id" : "9bc57688-302e-4e1f-840a-c747dcccb362" , # noqa
105
- "lang" : "en" ,
106
- "user_id" : "4cee7c39-7c34-4cc5-8543-42a8c88c9fe6" , # noqa
107
- "page_number" : 2 ,
108
- "entity_type" : "page" ,
109
- "title_txt_en" : "brother_004603.pdf" ,
110
- "_version_" : 1801539996403892224
111
- }
112
- ]
76
+ "response" : {
77
+ "numFound" : 1 ,
78
+ "start" : 0 ,
79
+ "numFoundExact" : True ,
80
+ "docs" : [
81
+ {
82
+ "id" : "0b663599-32b1-4396-8dbe-ae7cd327cec6" ,
83
+ "lang" : "en" ,
84
+ "title_txt_en" : "My Documents" ,
85
+ "entity_type" : "folder" ,
86
+ "_version_" : 1774301885457498112
87
+ },
88
+ {
89
+ "id" : "1c773599-32b1-4396-8dbe-ae7cd327cec6" ,
90
+ "lang" : "en" ,
91
+ "title_txt_en" : ".inbox" ,
92
+ "entity_type" : "folder" ,
93
+ "_version_" : 1774301885457498112
94
+ },
95
+ {
96
+ "id" : "a6e4916f-dea6-414b-aa38-f5b9ea375725" ,
97
+ "document_id" : "9bc57688-302e-4e1f-840a-c747dcccb362" ,
98
+ "lang" : "en" ,
99
+ "user_id" : "4cee7c39-7c34-4cc5-8543-42a8c88c9fe6" ,
100
+ "page_number" : 1 ,
101
+ "entity_type" : "page" ,
102
+ "title_txt_en" : "brother_004603.pdf" ,
103
+ "_version_" : 1801539996374532096
104
+ },
105
+ {
106
+ "id" : "72f6ca9e-af4b-4235-a56c-a62508e24efe" , # noqa
107
+ "document_id" : "9bc57688-302e-4e1f-840a-c747dcccb362" , # noqa
108
+ "lang" : "en" ,
109
+ "user_id" : "4cee7c39-7c34-4cc5-8543-42a8c88c9fe6" , # noqa
110
+ "page_number" : 2 ,
111
+ "entity_type" : "page" ,
112
+ "title_txt_en" : "brother_004603.pdf" ,
113
+ "_version_" : 1801539996403892224
114
+ }
115
+ ]
116
+ }
113
117
}
114
118
115
119
requests_mock .get (
0 commit comments