def test_change_url(self, session, kwargs):
     ensure_external_repo(**kwargs)
     new_kwargs = kwargs.copy()
     new_kwargs['url'] = 'http://new.example.com/'
     result = ensure_external_repo(**new_kwargs)
     assert result['stdout_lines'] == ['set url to http://new.example.com/']
     assert result['changed'] is True
 def test_create_check_mode(self, session, kwargs):
     new_kwargs = kwargs.copy()
     new_kwargs['check_mode'] = True
     result = ensure_external_repo(**new_kwargs)
     assert result['stdout_lines'] == ['would create repo centos-7-cr']
     assert result['changed'] is True
 def test_no_change(self, session, kwargs):
     ensure_external_repo(**kwargs)
     result = ensure_external_repo(**kwargs)
     assert result['stdout_lines'] == []
     assert result['changed'] is False
 def test_create(self, session, kwargs):
     result = ensure_external_repo(**kwargs)
     assert result['stdout_lines'] == ['created repo id 1']
     assert result['changed'] is True