Skip to content

Commit

Permalink
test pep 8
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Nov 24, 2013
1 parent 8acabc8 commit 66d0dc2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/zope/schema/tests/test__bootstrapfields.py
Expand Up @@ -232,11 +232,12 @@ def _constraint(value):

def _factory():
return obj
field = self._makeOne(required=False,
readonly=True,
constraint=_constraint,
defaultFactory=_factory,
)
field = self._makeOne(
required=False,
readonly=True,
constraint=_constraint,
defaultFactory=_factory,
)
self.assertEqual(field.required, False)
self.assertEqual(field.readonly, True)
self.assertEqual(field.constraint(self), False)
Expand Down Expand Up @@ -659,16 +660,16 @@ def test_validate_unchanged_not_already_set(self):
from zope.schema._bootstrapinterfaces import WrongType
klass = self._getTargetClass()
inst = DummyInst()
pw = self._makeOne(__name__= 'password').bind(inst)
pw = self._makeOne(__name__='password').bind(inst)
self.assertRaises(WrongType,
pw.validate, klass.UNCHANGED_PASSWORD)

def test_validate_unchanged_already_set(self):
klass = self._getTargetClass()
inst = DummyInst()
inst.password = 'foobar'
pw = self._makeOne(__name__= 'password').bind(inst)
pw.validate(klass.UNCHANGED_PASSWORD) # doesn't raise
pw = self._makeOne(__name__='password').bind(inst)
pw.validate(klass.UNCHANGED_PASSWORD) # doesn't raise

def test_constraint(self):
from zope.schema._compat import u
Expand Down

0 comments on commit 66d0dc2

Please sign in to comment.