Пример #1
0
    def test_arch_get_err(self):
        """Dummy tests for returning application archives (not found)
        """
        self.impl.archive.get.side_effect = LocalFileNotFoundError('foo')

        resp = self.client.get('/archive/<app>/<uniq>/app')
        self.assertEqual(resp.status_code, http_client.NOT_FOUND)
        resp = self.client.get('/archive/<app>/<uniq>/sys')
        self.assertEqual(resp.status_code, http_client.NOT_FOUND)
Пример #2
0
    def test_app_log_failure(self):
        """Dummy tests for the case when logs cannot be found."""
        self.impl.log.get.side_effect = LocalFileNotFoundError('foo')

        resp = self.client.get(
            '/local-app/proid.app/uniq/service/service_name')
        self.assertEqual(resp.status_code, http_client.NOT_FOUND)

        resp = self.client.get('/local-app/proid.app/uniq/sys/component')
        self.assertEqual(resp.status_code, http_client.NOT_FOUND)