Trying out pyVows, using this tutorial. http://ift.tt/21K0zMV
I can't get the server running to do integration tests. Here's my code.
from pyvows import Vows, expect
from django_pyvows.context import DjangoContext, DjangoHTTPContext
from selenium import webdriver
@Vows.batch
class TDDDjangoApp(DjangoHTTPContext):
def get_settings(self):
return "txtquery.settings"
def topic(self):
self.start_server()
browser = webdriver.Firefox()
browser.get(self.get_url("/"))
return browser
def should_prompt_the_user_with_a_django_page(self, topic):
expect(topic.title).to_include('Main Page')
And here's the error when I run pyVows ui-tests.py:
============
Vows Results
============
Tdd django app
Error in topic:
'Thread' object has no attribute 'server'
Traceback (most recent call last):
File "c:\users\sally\dropbox\code\djangoprojects\stitech\venv\lib\site-packages\pyvows\runner\gevent.py", line 104, in _run_setup_and_topic
topic = topic_func(*topic_list)
File "C:\Users\Sally\dropbox\code\djangoprojects\stitech\txtquery\ui-tests.py", line 72, in topic
self.start_server()
File "c:\users\sally\dropbox\code\djangoprojects\stitech\venv\lib\site-packages\django_pyvows\context.py", line 87, in start_server
self.server.start(settings)
File "c:\users\sally\dropbox\code\djangoprojects\stitech\venv\lib\site-packages\django_pyvows\server.py", line 50, in start
while not len(self.thr.server.requests._threads):
AttributeError: 'Thread' object has no attribute 'server'
Nested tests following this error have not been run.
Ô£ô OK ┬╗ 0 honored ÔÇó 0 broken (0.001000s)
When I look at this traceback I see a file in django_pyvows called server.py that's creating the error. I can't find a corresponding server.py in the pyvows github repository. So that is perhaps a little strange.
My project's current requirements that could be clashing:
CherryPy==5.3.0
cssselect==0.9.1
Django==1.9.6
django-pyvows==0.6.2
gevent==1.1.1
greenlet==0.4.9
httplib2==0.9.2
lxml==3.6.0
preggy==1.3.0
pyVows==2.0.6
selenium==2.53.2
six==1.10.0
Unidecode==0.4.19
Aucun commentaire:
Enregistrer un commentaire