@@ -26,7 +26,7 @@ def fixture_plugin_data() -> dict[str, Any]:
2626 The constructed plugin data
2727 """
2828 return {
29- 'local ' : False ,
29+ 'remotes ' : [ 'conancenter' ] ,
3030 }
3131
3232 @staticmethod
@@ -42,7 +42,7 @@ def fixture_plugin_type() -> type[ConanProvider]:
4242 def test_publish_local_only (
4343 self , plugin : ConanProvider , conan_mock_api_publish : Mock , conan_temp_conanfile : None , mocker : MockerFixture
4444 ) -> None :
45- """Test that publish with local=True only exports and builds locally
45+ """Test that publish with remotes=[] only exports and builds locally
4646
4747 Args:
4848 plugin: The plugin instance
@@ -51,7 +51,7 @@ def test_publish_local_only(
5151 mocker: Pytest mocker fixture
5252 """
5353 # Set plugin to local mode
54- plugin .data .local = True
54+ plugin .data .remotes = []
5555
5656 # Mock the necessary imports and API creation
5757 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -87,7 +87,7 @@ def test_publish_local_only(
8787 def test_publish_with_upload (
8888 self , plugin : ConanProvider , conan_mock_api_publish : Mock , conan_temp_conanfile : None , mocker : MockerFixture
8989 ) -> None :
90- """Test that publish with local=False exports, builds, and uploads
90+ """Test that publish with remotes=['conancenter'] exports, builds, and uploads
9191
9292 Args:
9393 plugin: The plugin instance
@@ -96,7 +96,7 @@ def test_publish_with_upload(
9696 mocker: Pytest mocker fixture
9797 """
9898 # Set plugin to upload mode
99- plugin .data .local = False
99+ plugin .data .remotes = [ 'conancenter' ]
100100
101101 # Mock the necessary imports and API creation
102102 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -130,7 +130,7 @@ def test_publish_no_remotes_configured(
130130 mocker: Pytest mocker fixture
131131 """
132132 # Set plugin to upload mode
133- plugin .data .local = False
133+ plugin .data .remotes = [ 'conancenter' ]
134134
135135 # Mock the necessary imports and API creation
136136 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -143,7 +143,7 @@ def test_publish_no_remotes_configured(
143143 conan_mock_api_publish .remotes .list .return_value = []
144144
145145 # Execute publish and expect ProviderConfigurationError
146- with pytest .raises (ProviderConfigurationError , match = 'No remotes configured for upload ' ):
146+ with pytest .raises (ProviderConfigurationError , match = 'No configured remotes found ' ):
147147 plugin .publish ()
148148
149149 def test_publish_no_packages_found (
@@ -158,7 +158,7 @@ def test_publish_no_packages_found(
158158 mocker: Pytest mocker fixture
159159 """
160160 # Set plugin to upload mode
161- plugin .data .local = False
161+ plugin .data .remotes = [ 'conancenter' ]
162162
163163 # Mock the necessary imports and API creation
164164 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -188,7 +188,7 @@ def test_publish_uses_default_profiles(
188188 mocker: Pytest mocker fixture
189189 """
190190 # Set plugin to local mode
191- plugin .data .local = True
191+ plugin .data .remotes = []
192192
193193 # Mock the necessary imports and API creation
194194 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -217,7 +217,7 @@ def test_publish_upload_parameters(
217217 mocker: Pytest mocker fixture
218218 """
219219 # Set plugin to upload mode
220- plugin .data .local = False
220+ plugin .data .remotes = [ 'conancenter' ]
221221
222222 # Mock the necessary imports and API creation
223223 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
@@ -228,7 +228,7 @@ def test_publish_upload_parameters(
228228
229229 # Mock remotes and package list
230230 mock_remote = MagicMock ()
231- mock_remote .name = 'origin '
231+ mock_remote .name = 'conancenter '
232232 remotes = [mock_remote ]
233233 conan_mock_api_publish .remotes .list .return_value = remotes
234234
@@ -262,7 +262,7 @@ def test_publish_list_pattern_creation(
262262 mocker: Pytest mocker fixture
263263 """
264264 # Set plugin to upload mode
265- plugin .data .local = False
265+ plugin .data .remotes = [ 'conancenter' ]
266266
267267 # Mock the necessary imports and API creation
268268 mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish )
0 commit comments