mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 08:03:48 +00:00
Added "exclude" parameter testing to unittests.
This commit is contained in:
parent
035d1e99a9
commit
2cfbd13c17
@ -93,9 +93,9 @@ class DjangoItemTest(unittest.TestCase):
|
||||
},
|
||||
i.errors)
|
||||
|
||||
i = BasePersonItem(name='John', age='22')
|
||||
i = BasePersonItem(name='John')
|
||||
self.assertTrue(i.is_valid(exclude=['age']))
|
||||
self.assertDictEqual({}, i.errors)
|
||||
self.assertTrue(i.is_valid())
|
||||
|
||||
# once the item is validated, it does not validate again
|
||||
i['name'] = long_name
|
||||
|
Loading…
x
Reference in New Issue
Block a user