mirror of https://github.com/scrapy/scrapy.git
add test for invalid option
This commit is contained in:
parent
0c44fac2b5
commit
23b3336c1f
|
|
@ -90,6 +90,10 @@ class PythonItemExporterTest(BaseItemExporterTest):
|
|||
def _get_exporter(self, **kwargs):
|
||||
return PythonItemExporter(binary=False, **kwargs)
|
||||
|
||||
def test_invalid_option(self):
|
||||
with self.assertRaisesRegexp(TypeError, "Unexpected options: invalid_option"):
|
||||
PythonItemExporter(invalid_option='something')
|
||||
|
||||
def test_nested_item(self):
|
||||
i1 = TestItem(name=u'Joseph', age='22')
|
||||
i2 = dict(name=u'Maria', age=i1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue