44
55from pulp_smash import config
66from pulp_smash .pulp3 .bindings import monitor_task
7- from pulp_smash .pulp3 .utils import gen_repo , gen_distribution
7+ from pulp_smash .pulp3 .utils import gen_repo , gen_distribution , download_content_unit
88
99from pulp_python .tests .functional .utils import gen_python_client , gen_python_remote
1010from pulp_python .tests .functional .utils import set_up_module as setUpModule # noqa:F401
@@ -57,13 +57,11 @@ def test_01_sync(self):
5757 repository_sync_data = RepositorySyncURL (remote = self .remote .pulp_href )
5858 sync_response = self .repo_api .sync (self .repo .pulp_href , repository_sync_data )
5959 task = monitor_task (sync_response .task )
60- self .distribution = self .distributions_api .read (self .distribution .pulp_href )
6160
6261 # Check that all the appropriate resources were created
6362 self .assertGreater (len (task .created_resources ), 1 )
6463 self .assertEqual (self .publications_api .list ().count , 1 )
65- self .assertTrue (self .distribution .publication is not None )
66- self .assertTrue (self .distribution .publication in task .created_resources )
64+ download_content_unit (self .cfg , self .distribution .to_dict (), "simple/" )
6765
6866 # Sync the repository again. Since there should be no new repository version, there
6967 # should be no new publications or distributions either.
@@ -78,16 +76,14 @@ def test_02_modify(self):
7876 self .assertEqual (self .publications_api .list ().count , 0 )
7977 self .assertTrue (self .distribution .publication is None )
8078
81- # Modify the repository by adding a coment unit
79+ # Modify the repository by adding a content unit
8280 content = self .content_api .list ().results [0 ].pulp_href
8381 modify_response = self .repo_api .modify (
8482 self .repo .pulp_href , {"add_content_units" : [content ]}
8583 )
8684 task = monitor_task (modify_response .task )
87- self .distribution = self .distributions_api .read (self .distribution .pulp_href )
8885
8986 # Check that all the appropriate resources were created
9087 self .assertGreater (len (task .created_resources ), 1 )
9188 self .assertEqual (self .publications_api .list ().count , 1 )
92- self .assertTrue (self .distribution .publication is not None )
93- self .assertTrue (self .distribution .publication in task .created_resources )
89+ download_content_unit (self .cfg , self .distribution .to_dict (), "simple/" )
0 commit comments