@@ -724,7 +724,7 @@ def test_create_devicelocation_using_related_ids(self):
724
724
floorplan = self ._create_floorplan ()
725
725
location = floorplan .location
726
726
url = reverse ("geo_api:device_location" , args = [device .id ])
727
- with self .assertNumQueries (26 ):
727
+ with self .assertNumQueries (29 ):
728
728
response = self .client .put (
729
729
url ,
730
730
data = {
@@ -762,7 +762,7 @@ def test_create_devicelocation_location_floorplan(self):
762
762
"floorplan.image" : self ._get_simpleuploadedfile (),
763
763
"indoor" : ["12.342,23.541" ],
764
764
}
765
- with self .assertNumQueries (40 ):
765
+ with self .assertNumQueries (43 ):
766
766
response = self .client .put (
767
767
url , encode_multipart (BOUNDARY , data ), content_type = MULTIPART_CONTENT
768
768
)
@@ -829,7 +829,7 @@ def test_create_devicelocation_only_location(self):
829
829
"type" : "indoor" ,
830
830
}
831
831
}
832
- with self .assertNumQueries (29 ):
832
+ with self .assertNumQueries (32 ):
833
833
response = self .client .put (url , data = data , content_type = 'application/json' )
834
834
self .assertEqual (response .status_code , 201 )
835
835
self .assertEqual (self .location_model .objects .count (), 1 )
@@ -869,7 +869,7 @@ def test_create_devicelocation_existing_location_new_floorplan(self):
869
869
"floorplan.image" : self ._get_simpleuploadedfile (),
870
870
"indoor" : ["12.342,23.541" ],
871
871
}
872
- with self .assertNumQueries (34 ):
872
+ with self .assertNumQueries (37 ):
873
873
response = self .client .put (
874
874
url , encode_multipart (BOUNDARY , data ), content_type = MULTIPART_CONTENT
875
875
)
@@ -892,7 +892,7 @@ def test_update_devicelocation_change_location_outdoor_to_indoor(self):
892
892
}
893
893
self .assertEqual (device_location .location .type , "outdoor" )
894
894
self .assertEqual (device_location .floorplan , None )
895
- with self .assertNumQueries (31 ):
895
+ with self .assertNumQueries (33 ):
896
896
response = self .client .put (
897
897
path , encode_multipart (BOUNDARY , data ), content_type = MULTIPART_CONTENT
898
898
)
@@ -911,7 +911,7 @@ def test_update_devicelocation_patch_indoor(self):
911
911
"indoor" : "0,0" ,
912
912
}
913
913
self .assertEqual (device_location .indoor , "-140.38620,40.369227" )
914
- with self .assertNumQueries (18 ):
914
+ with self .assertNumQueries (20 ):
915
915
response = self .client .patch (path , data , content_type = "application/json" )
916
916
self .assertEqual (response .status_code , 200 )
917
917
device_location .refresh_from_db ()
@@ -928,7 +928,7 @@ def test_update_devicelocation_floorplan_related_id(self):
928
928
data = {
929
929
"floorplan" : str (floor2 .id ),
930
930
}
931
- with self .assertNumQueries (20 ):
931
+ with self .assertNumQueries (22 ):
932
932
response = self .client .patch (path , data , content_type = 'application/json' )
933
933
self .assertEqual (response .status_code , 200 )
934
934
device_location .refresh_from_db ()
@@ -942,7 +942,7 @@ def test_update_devicelocation_location_related_id(self):
942
942
data = {
943
943
"location" : str (location2 .id ),
944
944
}
945
- with self .assertNumQueries (19 ):
945
+ with self .assertNumQueries (21 ):
946
946
response = self .client .patch (path , data , content_type = "application/json" )
947
947
self .assertEqual (response .status_code , 200 )
948
948
device_location .refresh_from_db ()
0 commit comments