Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit e6b347d

Browse files
authored
Remove usage of _chunks from tests (#1189)
1 parent 5dc7191 commit e6b347d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

services/tests/test_report.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_report_generator(self):
105105
}
106106

107107
res = build_report(**data)
108-
assert len(res._chunks) == 3
108+
assert len(res.files) == 3
109109

110110
@patch("shared.api_archive.archive.ArchiveService.read_chunks")
111111
def test_build_report_from_commit(self, read_chunks_mock):
@@ -123,7 +123,6 @@ def test_build_report_from_commit(self, read_chunks_mock):
123123
)
124124

125125
res = build_report_from_commit(commit)
126-
assert len(res._chunks) == 3
127126
assert len(res.files) == 3
128127
file_1, file_2, file_3 = sorted_files(res)
129128
assert file_1.name == "awesome/__init__.py"
@@ -187,7 +186,6 @@ def test_build_report_from_commit_null_session_totals(self, read_chunks_mock):
187186
upload = commit.reports.first().sessions.first()
188187
upload.uploadleveltotals.delete()
189188
res = build_report_from_commit(commit)
190-
assert len(res._chunks) == 3
191189
assert len(res.files) == 3
192190
file_1, file_2, file_3 = sorted_files(res)
193191
assert file_1.name == "awesome/__init__.py"
@@ -220,7 +218,6 @@ def test_build_report_from_commit_with_flags(self, read_chunks_mock):
220218
commit = CommitWithReportFactory.create(message="aaaaa", commitid="abf6d4d")
221219
report = build_report_from_commit(commit)
222220
res = report.flags["integrations"].report
223-
assert len(res.report._chunks) == 3
224221
assert len(res.files) == 3
225222
file_1, file_2, file_3 = sorted_files(res)
226223
assert file_1.name == "awesome/__init__.py"
@@ -260,7 +257,6 @@ def test_build_report_from_commit_with_non_carried_forward_flags(
260257

261258
report = build_report_from_commit(commit)
262259
res = report.flags["integrations"].report
263-
assert len(res.report._chunks) == 3
264260
assert len(res.files) == 3
265261
file_1, file_2, file_3 = sorted_files(res)
266262
assert file_1.name == "awesome/__init__.py"
@@ -345,7 +341,6 @@ def test_build_report_from_commit_fallback(self, read_chunks_mock):
345341
)
346342
res = build_report_from_commit(commit)
347343

348-
assert len(res._chunks) == 3
349344
assert len(res.files) == 3
350345
file_1, file_2, file_3 = sorted_files(res)
351346
assert file_1.name == "awesome/__init__.py"

0 commit comments

Comments
 (0)