77
88
99@pytest .fixture
10- def nei_nienborg_model_labeledvideo_file (connection : dj .Connection ) -> Generator [Optional [dj .Table ], Any , Any ]:
10+ def nei_nienborg_model_labeledvideo_file (
11+ connection : dj .Connection ,
12+ ) -> Generator [Optional [dj .Table ], Any , Any ]:
1113 with pytest .MonkeyPatch .context () as mp :
12- mp .setenv (' DJ_SUPPORT_FILEPATH_MANAGEMENT' , ' TRUE' )
13- vm = get_schema_as_vm (' nei_nienborg_model' , connection )
14+ mp .setenv (" DJ_SUPPORT_FILEPATH_MANAGEMENT" , " TRUE" )
15+ vm = get_schema_as_vm (" nei_nienborg_model" , connection )
1416 yield None if vm is None else vm .LabeledVideo .File
1517
1618
@@ -21,17 +23,18 @@ def test_can_init(self):
2123 assert djc is not None
2224
2325 @pytest .mark .skipif (
24- (get_schema_as_vm (' nei_nienborg_model' , dj .conn (** get_db_creds ())) is None ),
25- reason = "Cannot access schema 'nei_nienborg_model' with these credentials"
26+ (get_schema_as_vm (" nei_nienborg_model" , dj .conn (** get_db_creds ())) is None ),
27+ reason = "Cannot access schema 'nei_nienborg_model' with these credentials" ,
2628 )
27- def test_can_fetch_filepath_attrs (self , nei_nienborg_model_labeledvideo_file : dj .Table , connection ):
29+ def test_can_fetch_filepath_attrs (
30+ self , nei_nienborg_model_labeledvideo_file : dj .Table , connection
31+ ):
2832 """
2933 Tests _DJConnector._fetch_records for a table with a filepath attribute
3034
3135 https://datajoint.atlassian.net/browse/PLAT-341
3236 """
3337 table = nei_nienborg_model_labeledvideo_file
34- assert os .environ .get (' DJ_SUPPORT_FILEPATH_MANAGEMENT' ).upper () == ' TRUE'
35- assert table .fetch (' KEY' , limit = 1 , download_path = None )
38+ assert os .environ .get (" DJ_SUPPORT_FILEPATH_MANAGEMENT" ).upper () == " TRUE"
39+ assert table .fetch (" KEY" , limit = 1 , download_path = None )
3640 assert table .fetch (limit = 1 )
37-
0 commit comments