File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ def testSupportedFormatChecking(self):
6464 for file_format , location in self .local .items ():
6565 if file_format != 'unsupported' :
6666 # Tests the behavior after receiving supported file types with and without the 'file://' prefix
67- self .assertEquals (wf_info (location ), self .expected [file_format ])
68- self .assertEquals (wf_info (location [7 :]), self .expected [file_format ])
67+ self .assertEqual (wf_info (location ), self .expected [file_format ])
68+ self .assertEqual (wf_info (location [7 :]), self .expected [file_format ])
6969
7070 else :
7171 # Tests behavior after receiving a non supported file type.
@@ -91,7 +91,7 @@ def testFileLocationChecking(self):
9191 wf_info (location )
9292
9393 else :
94- self .assertEquals (wf_info (location ), self .expected [file_format ])
94+ self .assertEqual (wf_info (location ), self .expected [file_format ])
9595 self .assertFalse (os .path .isfile (os .path .join (os .getcwd (), 'fetchedFromRemote.' + file_format )))
9696
9797
Original file line number Diff line number Diff line change 55import yaml
66import glob
77import requests
8- import urllib
98import logging
109
1110from wes_service .util import visit
1211
1312from future .standard_library import hooks
1413
1514with hooks ():
16- from urllib .request import pathname2url
15+ from urllib .request import urlopen , pathname2url
1716
1817
1918def two_seven_compatible (filePath ):
@@ -60,7 +59,7 @@ def wf_info(workflow_path):
6059 html = urlopen (workflow_path ).read ()
6160 local_loc = os .path .join (os .getcwd (), 'fetchedFromRemote.' + file_type )
6261 with open (local_loc , 'w' ) as f :
63- f .write (html )
62+ f .write (html . decode () )
6463 version = wf_info ('file://' + local_loc )[0 ] # Don't take the file_type here, found it above.
6564 os .remove (local_loc ) # TODO: Find a way to avoid recreating file before version determination.
6665 else :
@@ -90,7 +89,7 @@ def fixpaths(d):
9089 if "path" in d :
9190 if ":" not in d ["path" ]:
9291 local_path = os .path .normpath (os .path .join (os .getcwd (), basedir , d ["path" ]))
93- d ["location" ] = urllib . pathname2url (local_path )
92+ d ["location" ] = pathname2url (local_path )
9493 else :
9594 d ["location" ] = d ["path" ]
9695 del d ["path" ]
You can’t perform that action at this time.
0 commit comments