[Zope3-checkins]
SVN: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/
change internal references to zope.app.testing.testbrowser to
zope.testbrowser
Benji York
benji at zope.com
Fri Jul 29 11:42:09 EDT 2005
Log message for revision 37542:
change internal references to zope.app.testing.testbrowser to zope.testbrowser
in preparation for moving package
Changed:
U Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/README.txt
U Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py
U Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/testing.py
-=-
Modified: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/README.txt
===================================================================
--- Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/README.txt 2005-07-29 15:39:21 UTC (rev 37541)
+++ Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/README.txt 2005-07-29 15:42:09 UTC (rev 37542)
@@ -2,10 +2,10 @@
The Test Browser
================
-The ``zope.app.testing.testbrowser`` module exposes a ``Browser`` class that
+The ``zope.testbrowser`` module exposes a ``Browser`` class that
simulates a web browser similar to Mozilla Firefox or IE.
- >>> from zope.app.testing.testbrowser import Browser
+ >>> from zope.testbrowser import Browser
>>> browser = Browser()
>>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
@@ -658,7 +658,7 @@
- The controls for this specific form are also available:
>>> form.controls
- <zope.app.testing.testbrowser.browser.ControlsMapping object at ...>
+ <zope.testbrowser.browser.ControlsMapping object at ...>
>>> form.controls['text-value']
'First Text'
@@ -715,7 +715,7 @@
and retrievel with optional default value:
>>> browser.forms.get('2')
- <zope.app.testing.testbrowser.browser.Form object at ...>
+ <zope.testbrowser.browser.Form object at ...>
>>> browser.forms.get('invalid', 42)
42
Modified: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py
===================================================================
--- Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py 2005-07-29 15:39:21 UTC (rev 37541)
+++ Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/browser.py 2005-07-29 15:42:09 UTC (rev 37542)
@@ -20,7 +20,7 @@
import mechanize
import zope.interface
-from zope.app.testing.testbrowser import interfaces
+from zope.testbrowser import interfaces
class Browser(object):
@@ -37,32 +37,32 @@
@property
def url(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return self.mech_browser.geturl()
@property
def isHtml(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return self.mech_browser.viewing_html()
@property
def title(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return self.mech_browser.title()
@property
def controls(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return ControlsMapping(self)
@property
def forms(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return FormsMapping(self)
@property
def contents(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
response = self.mech_browser.response()
old_location = response.tell()
response.seek(0)
@@ -74,12 +74,12 @@
@property
def headers(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
return self.mech_browser.response().info()
@apply
def handleErrors():
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
header_key = 'X-zope-handle-errors'
def get(self):
@@ -98,26 +98,26 @@
return property(get, set)
def open(self, url, data=None):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
self.mech_browser.open(url, data)
self._changed()
def reload(self):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
self.mech_browser.reload()
self._changed()
def goBack(self, count=1):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
self.mech_browser.back(count)
self._changed()
def addHeader(self, key, value):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
self.mech_browser.addheaders.append( (key, value) )
def click(self, text=None, url=None, id=None, name=None, coord=(1,1)):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
# Determine whether the click is a form submit and click the submit
# button if this is the case.
form, control = self._findControl(text, id, name, type='submit')
@@ -150,7 +150,7 @@
self._changed()
def getControl(self, text):
- """See zope.app.testing.testbrowser.interfaces.IBrowser"""
+ """See zope.testbrowser.interfaces.IBrowser"""
form, control = self._findControl(text, text, text)
if control is None:
raise ValueError('could not locate control: ' + text)
@@ -204,7 +204,7 @@
self.mech_control = control
def __getattr__(self, name):
- # See zope.app.testing.testbrowser.interfaces.IControl
+ # See zope.testbrowser.interfaces.IControl
names = ['disabled', 'type', 'name', 'readonly', 'multiple']
if name in names:
return getattr(self.mech_control, name, None)
@@ -213,7 +213,7 @@
@apply
def value():
- """See zope.app.testing.testbrowser.interfaces.IControl"""
+ """See zope.testbrowser.interfaces.IControl"""
def fget(self):
value = self.mech_control.value
@@ -238,7 +238,7 @@
@property
def options(self):
- """See zope.app.testing.testbrowser.interfaces.IControl"""
+ """See zope.testbrowser.interfaces.IControl"""
if (self.type == 'checkbox'
and self.mech_control.possible_items() == ['on']):
return [True]
@@ -291,7 +291,7 @@
self.mech_form = form
def __getitem__(self, key):
- """See zope.app.testing.testbrowser.interfaces.IControlsMapping"""
+ """See zope.testbrowser.interfaces.IControlsMapping"""
form, control = self.browser._findControl(key, key, key,
form=self.mech_form)
if control is None:
@@ -306,7 +306,7 @@
return default
def __contains__(self, item):
- """See zope.app.testing.testbrowser.interfaces.IControlsMapping"""
+ """See zope.testbrowser.interfaces.IControlsMapping"""
try:
self[item]
except KeyError:
@@ -315,14 +315,14 @@
return True
def __setitem__(self, key, value):
- """See zope.app.testing.testbrowser.interfaces.IControlsMapping"""
+ """See zope.testbrowser.interfaces.IControlsMapping"""
form, control = self.browser._findControl(key, key, key)
if control is None:
raise KeyError(key)
Control(control).value = value
def update(self, mapping):
- """See zope.app.testing.testbrowser.interfaces.IControlsMapping"""
+ """See zope.testbrowser.interfaces.IControlsMapping"""
for k, v in mapping.items():
self[k] = v
@@ -332,7 +332,7 @@
zope.interface.implements(interfaces.IForm)
def __getattr__(self, name):
- # See zope.app.testing.testbrowser.interfaces.IForm
+ # See zope.testbrowser.interfaces.IForm
names = ['action', 'method', 'enctype', 'name']
if name in names:
return getattr(self.mech_form, name, None)
@@ -341,16 +341,16 @@
@property
def id(self):
- """See zope.app.testing.testbrowser.interfaces.IForm"""
+ """See zope.testbrowser.interfaces.IForm"""
return self.mech_form.attrs.get('id')
@property
def controls(self):
- """See zope.app.testing.testbrowser.interfaces.IForm"""
+ """See zope.testbrowser.interfaces.IForm"""
return ControlsMapping(browser=self.browser, form=self.mech_form)
def submit(self, text=None, id=None, name=None, coord=(1,1)):
- """See zope.app.testing.testbrowser.interfaces.IForm"""
+ """See zope.testbrowser.interfaces.IForm"""
form, control = self.browser._findControl(
text, id, name, type='submit', form=self.mech_form)
@@ -363,7 +363,7 @@
self.browser._changed()
def getControl(self, text):
- """See zope.app.testing.testbrowser.interfaces.IForm"""
+ """See zope.testbrowser.interfaces.IForm"""
form, control = self.browser._findControl(text, text, text,
form=self.mech_form)
if control is None:
Modified: Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/testing.py
===================================================================
--- Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/testing.py 2005-07-29 15:39:21 UTC (rev 37541)
+++ Zope3/branches/testbrowser-integration/src/zope/app/testing/testbrowser/testing.py 2005-07-29 15:42:09 UTC (rev 37542)
@@ -24,7 +24,7 @@
import ClientCookie
from zope.app.testing.functional import HTTPCaller
-from zope.app.testing.testbrowser import browser
+from zope.testbrowser import browser
class PublisherConnection(object):
More information about the Zope3-Checkins
mailing list