plone.restapi common errors

when writing a test I was getting errors like this when running it:

ConnectionError: HTTPConnectionPool(host=’nohost’, port=80): Max retries exceeded with url: /plone/@resultdbusers/noam (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd8f5469ad0>: Failed to establish a new connection: [Errno -2] Name or service not known’,))

I just had to define the layer with z2.ZSERVER_FIXTURE

from plone.testing import z2

SOME_API_FUNCTIONAL_TESTING = FunctionalTesting(
bases=(SOME_BASE_API_FIXTURE,
z2.ZSERVER_FIXTURE),
name=’SomeApiLayer:FunctionalTesting’
)

then it works

Advertisements
About

Work is fun!

Tagged with: , , , , ,
Posted in development, ploneCMS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
March 2017
M T W T F S S
« Feb   Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 25 other followers

%d bloggers like this: