22
33import  pytest 
44
5- import  gardenlinux .github .__main__  as  gh 
5+ import  gardenlinux .github .release . __main__  as  gh 
66from  gardenlinux .constants  import  GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME 
77
88from  ..constants  import  TEST_GARDENLINUX_COMMIT , TEST_GARDENLINUX_RELEASE 
@@ -44,7 +44,7 @@ def test_script_create_dry_run(monkeypatch, capfd):
4444
4545    monkeypatch .setattr (sys , "argv" , ["gh" , "create" , "--owner" , "gardenlinux" , "--repo" ,
4646                        "gardenlinux" , "--tag" , TEST_GARDENLINUX_RELEASE , "--commit" , TEST_GARDENLINUX_COMMIT , "--dry-run" ])
47-     monkeypatch .setattr ("gardenlinux.github.__main__.create_github_release_notes" ,
47+     monkeypatch .setattr ("gardenlinux.github.release. __main__.create_github_release_notes" ,
4848                        lambda  tag , commit , bucket : f"{ tag } { commit } { bucket }  )
4949
5050    gh .main ()
@@ -57,9 +57,9 @@ def test_script_create_dry_run(monkeypatch, capfd):
5757def  test_script_create (monkeypatch , caplog ):
5858    monkeypatch .setattr (sys , "argv" , ["gh" , "create" , "--owner" , "gardenlinux" , "--repo" ,
5959                        "gardenlinux" , "--tag" , TEST_GARDENLINUX_RELEASE , "--commit" , TEST_GARDENLINUX_COMMIT ])
60-     monkeypatch .setattr ("gardenlinux.github.__main__.create_github_release_notes" ,
60+     monkeypatch .setattr ("gardenlinux.github.release. __main__.create_github_release_notes" ,
6161                        lambda  tag , commit , bucket : f"{ tag } { commit } { bucket }  )
62-     monkeypatch .setattr ("gardenlinux.github.__main__.create_github_release" ,
62+     monkeypatch .setattr ("gardenlinux.github.release. __main__.create_github_release" ,
6363                        lambda  a1 , a2 , a3 , a4 , a5 , a6 : TEST_GARDENLINUX_RELEASE )
6464
6565    gh .main ()
@@ -71,7 +71,7 @@ def test_script_create(monkeypatch, caplog):
7171def  test_script_upload_dry_run (monkeypatch , capfd ):
7272    monkeypatch .setattr (sys , "argv" , ["gh" , "upload" , "--owner" , "gardenlinux" , "--repo" ,
7373                        "gardenlinux" , "--release_id" , TEST_GARDENLINUX_RELEASE , "--file_path" , "foo" , "--dry-run" ])
74-     monkeypatch .setattr ("gardenlinux.github.__main__.upload_to_github_release_page" ,
74+     monkeypatch .setattr ("gardenlinux.github.release. __main__.upload_to_github_release_page" ,
7575                        lambda  a1 , a2 , a3 , a4 , dry_run : print (f"dry-run: { dry_run }  ))
7676
7777    gh .main ()
0 commit comments