def test_publish(self, *, rmock: requests_mock.Mocker) -> None:
        rmock.post("http://test/api/publish/s3%3Amyendpoint%3Atest_a__1",
                   text='{"AcquireByHash":false,"Architectures":["amd64"],"Distribution":"test","Label":"test",'
                        '"Origin":"origin","Prefix":"test/a_1","SkipContents":false,'
                        '"SourceKind":"local","Sources":[{"Component":"main","Name":"aptly-repo"}],'
                        '"Storage":"s3:myendpoint"}')
        self.assertEqual(
            self.papi.publish(
                sources=[{'Name': 'aptly-repo'}], architectures=['amd64'],
                prefix='s3:myendpoint:test/a_1', distribution='test', label='test', origin='origin',
                sign_batch=True, sign_gpgkey='A16BE921', sign_passphrase='*********',
                force_overwrite=True, sign_keyring="/etc/gpg-managed-keyring/pubring.pub",
                sign_secret_keyring="/etc/gpg-managed-keyring/secring.gpg",
                acquire_by_hash=False
            ),
            PublishEndpoint(
                storage='s3:myendpoint',
                prefix='test/a_1',
                distribution='test',
                source_kind='local',
                sources=[{'Component': 'main', 'Name': 'aptly-repo'}],
                architectures=['amd64'],
                label='test',
                origin='origin',
                acquire_by_hash=False
            )
        )