File tree 1 file changed +4
-6
lines changed
microsetta_private_api/repo/tests
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ def setUp(self):
28
28
29
29
file_name = "test_source.py"
30
30
file_label = "Test Source Repo"
31
- fh = open ( file_name , "rb" )
32
- file_contents = fh . read ()
33
- fh . close ()
31
+ # Opening and reading a file's contents doesn't appear to work on
32
+ # GitHub during workflow, so we need to fake the contents
33
+ file_contents = b'Imagine a full file here'
34
34
cur = t .cursor ()
35
35
cur .execute (
36
36
"INSERT INTO ag.external_reports ("
@@ -207,9 +207,7 @@ def test_get_external_report_bytes(self):
207
207
HUMAN_SOURCE .id , er .external_report_id
208
208
)
209
209
210
- fh = open ("test_source.py" , "rb" )
211
- act = fh .read ()
212
- fh .close ()
210
+ act = b'Imagine a full file here'
213
211
214
212
self .assertEqual (bytes (obs .file_contents ), act )
215
213
You can’t perform that action at this time.
0 commit comments