@@ -193,6 +193,7 @@ def test_library_setting_data(self):
193193 classificationStyleEnabled
194194 classificationObjectEnabled
195195 classificationLocationEnabled
196+ classificationFaceEnabled
196197 }
197198 sourceFolder
198199 }
@@ -202,14 +203,15 @@ def test_library_setting_data(self):
202203 data = get_graphql_content (response )
203204 assert response .status_code == 200
204205 self .assertEqual (data ['data' ]['librarySetting' ]['library' ]['name' ], self .defaults ['library' ].name )
205- self .assertFalse (data ['data' ]['librarySetting' ]['library' ]['classificationColorEnabled' ])
206- self .assertFalse (data ['data' ]['librarySetting' ]['library' ]['classificationStyleEnabled' ])
207- assert data ['data' ]['librarySetting' ]['library' ]['classificationObjectEnabled' ]
208- assert data ['data' ]['librarySetting' ]['library' ]['classificationLocationEnabled' ]
206+ self .assertTrue (data ['data' ]['librarySetting' ]['library' ]['classificationColorEnabled' ])
207+ self .assertTrue (data ['data' ]['librarySetting' ]['library' ]['classificationStyleEnabled' ])
208+ self .assertTrue (data ['data' ]['librarySetting' ]['library' ]['classificationObjectEnabled' ])
209+ self .assertTrue (data ['data' ]['librarySetting' ]['library' ]['classificationLocationEnabled' ])
210+ self .assertTrue (data ['data' ]['librarySetting' ]['library' ]['classificationFaceEnabled' ])
209211 self .assertEqual (data ['data' ]['librarySetting' ]['sourceFolder' ], self .defaults ['library' ].paths .all ()[0 ].path )
210212
211- def test_library_update_style_enabled_mutaion (self ):
212- """Test library updateStyleEnabled mutaion response."""
213+ def test_library_update_style_enabled_mutation (self ):
214+ """Test library updateStyleEnabled mutation response."""
213215 mutation = """
214216 mutation updateStyleEnabled(
215217 $classificationStyleEnabled: Boolean!
@@ -230,8 +232,8 @@ def test_library_update_style_enabled_mutaion(self):
230232 assert response .status_code == 200
231233 assert tuple (tuple (data .values ())[0 ].values ())[0 ].get ('classificationStyleEnabled' )
232234
233- def test_library_update_color_enabled_mutaion (self ):
234- """Test library updateColorEnabled mutaion response."""
235+ def test_library_update_color_enabled_mutation (self ):
236+ """Test library updateColorEnabled mutation response."""
235237 mutation = """
236238 mutation updateColorEnabled(
237239 $classificationColorEnabled: Boolean!
@@ -252,8 +254,8 @@ def test_library_update_color_enabled_mutaion(self):
252254 assert response .status_code == 200
253255 assert tuple (tuple (data .values ())[0 ].values ())[0 ].get ('classificationColorEnabled' )
254256
255- def test_library_update_location_enabled_mutaion (self ):
256- """Test library updateLocationEnabled mutaion response."""
257+ def test_library_update_location_enabled_mutation (self ):
258+ """Test library updateLocationEnabled mutation response."""
257259 mutation = """
258260 mutation updateLocationEnabled(
259261 $classificationLocationEnabled: Boolean!
@@ -274,8 +276,8 @@ def test_library_update_location_enabled_mutaion(self):
274276 assert response .status_code == 200
275277 self .assertFalse (tuple (tuple (data .values ())[0 ].values ())[0 ].get ('classificationLocationEnabled' ))
276278
277- def test_library_update_object_enabled_mutaion (self ):
278- """Test library updateObjectEnabled mutaion response."""
279+ def test_library_update_object_enabled_mutation (self ):
280+ """Test library updateObjectEnabled mutation response."""
279281 mutation = """
280282 mutation updateObjectEnabled(
281283 $classificationObjectEnabled: Boolean!
@@ -296,8 +298,8 @@ def test_library_update_object_enabled_mutaion(self):
296298 assert response .status_code == 200
297299 self .assertFalse (tuple (tuple (data .values ())[0 ].values ())[0 ].get ('classificationObjectEnabled' ))
298300
299- def test_library_update_source_folder_mutaion (self ):
300- """Test library updateSourceFolder mutaion response."""
301+ def test_library_update_source_folder_mutation (self ):
302+ """Test library updateSourceFolder mutation response."""
301303 mutation = """
302304 mutation updateSourceFolder($sourceFolder: String!, $libraryId: ID) {
303305 updateSourceFolder(
@@ -313,7 +315,7 @@ def test_library_update_source_folder_mutaion(self):
313315 self .assertEqual (tuple (tuple (data .values ())[0 ].values ())[0 ].get ('sourceFolder' ),self .defaults ['library' ].paths .all ()[0 ].path )
314316
315317 def test_change_password_mutation (self ):
316- """Test change password mutaion response."""
318+ """Test change password mutation response."""
317319 mutation = """
318320 mutation changePassword (
319321 $oldPassword: String!,
@@ -831,15 +833,20 @@ def test_onboarding_steps(self):
831833 assert User .objects .first ().has_configured_importing
832834 self .assertFalse (User .objects .first ().has_configured_image_analysis )
833835 mutation = """
834- mutation ($classificationColorEnabled: Boolean!,$classificationStyleEnabled: Boolean!,
835- $classificationObjectEnabled: Boolean!,$classificationLocationEnabled: Boolean!,
836+ mutation (
837+ $classificationColorEnabled: Boolean!,
838+ $classificationStyleEnabled: Boolean!,
839+ $classificationObjectEnabled: Boolean!,
840+ $classificationLocationEnabled: Boolean!,
841+ $classificationFaceEnabled: Boolean!,
836842 $userId: ID!,$libraryId: ID!,
837843 ) {
838844 imageAnalysis(input:{
839845 classificationColorEnabled:$classificationColorEnabled,
840846 classificationStyleEnabled:$classificationStyleEnabled,
841847 classificationObjectEnabled:$classificationObjectEnabled,
842848 classificationLocationEnabled:$classificationLocationEnabled,
849+ classificationFaceEnabled:$classificationFaceEnabled,
843850 userId:$userId,
844851 libraryId:$libraryId,
845852 }) {
@@ -851,8 +858,11 @@ def test_onboarding_steps(self):
851858 library_id = data ['data' ]['PhotoImporting' ]['libraryId' ]
852859 response = self .api_client .post_graphql (
853860 mutation , {
854- 'classificationColorEnabled' : True , 'classificationStyleEnabled' : True ,
855- 'classificationObjectEnabled' : False , 'classificationLocationEnabled' : False ,
861+ 'classificationColorEnabled' : True ,
862+ 'classificationStyleEnabled' : True ,
863+ 'classificationObjectEnabled' : False ,
864+ 'classificationLocationEnabled' : False ,
865+ 'classificationFaceEnabled' : False ,
856866 'userId' : data ['data' ]['PhotoImporting' ]['userId' ],
857867 'libraryId' : data ['data' ]['PhotoImporting' ]['libraryId' ],
858868 })
0 commit comments