Skip to content

Commit fa41c9d

Browse files
committed
OP#10323: Move test setup functions to bottom of unit test file
1 parent d2e5b05 commit fa41c9d

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

‎tests/unit/OTAnalytics/plugin_s3/test_otconfig_upload.py‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99
PREFIX = S3KeyPrefix("project-1/site-2/otcamera19")
1010

1111

12-
@dataclass
13-
class Given:
14-
upload: AsyncMock
15-
16-
17-
def create_given() -> Given:
18-
return Given(upload=AsyncMock(spec=S3Upload))
19-
20-
21-
def create_target(given: Given) -> S3OtconfigUpload:
22-
return S3OtconfigUpload(upload=given.upload)
23-
24-
2512
class TestS3OtconfigUpload:
2613
async def test_uploads_under_the_prefix_by_file_name(self, tmp_path: Path) -> None:
2714
"""#Requirement https://openproject.platomo.de/wp/10323"""
@@ -34,3 +21,16 @@ async def test_uploads_under_the_prefix_by_file_name(self, tmp_path: Path) -> No
3421
given.upload.upload.assert_awaited_once_with(
3522
src=file, key="project-1/site-2/otcamera19/my_project.otconfig"
3623
)
24+
25+
26+
@dataclass
27+
class Given:
28+
upload: AsyncMock
29+
30+
31+
def create_given() -> Given:
32+
return Given(upload=AsyncMock(spec=S3Upload))
33+
34+
35+
def create_target(given: Given) -> S3OtconfigUpload:
36+
return S3OtconfigUpload(upload=given.upload)

0 commit comments

Comments
 (0)