Exemplo n.º 1
0
 def test_create_with_config(self, connection_mock, controller_mock,
                             jsonschema_mock):
     config = Configuration(http_proxy="http://localhost",
                            https_proxy="https://localhost",
                            retries_num=10,
                            retry_interval=1,
                            threads_num=8,
                            ignore_errors_num=6)
     RepositoryApi.create(config, "deb", "x86_64")
     connection_mock.assert_called_once_with(
         proxy="http://localhost",
         secure_proxy="https://localhost",
         retries_num=10,
         retry_interval=1)
     controller_mock.load.assert_called_once_with(mock.ANY, "deb", "x86_64")
Exemplo n.º 2
0
 def test_create_with_config(self, connection_mock, controller_mock,
                             jsonschema_mock):
     config = Configuration(
         http_proxy="http://localhost", https_proxy="https://localhost",
         retries_num=10, retry_interval=1, threads_num=8,
         ignore_errors_num=6
     )
     RepositoryApi.create(config, "deb", "x86_64")
     connection_mock.assert_called_once_with(
         proxy="http://localhost",
         secure_proxy="https://localhost",
         retries_num=10,
         retry_interval=1
     )
     controller_mock.load.assert_called_once_with(
         mock.ANY, "deb", "x86_64"
     )