Esempio n. 1
0
 def test_documentor(self):
     from faker.cli import print_doc
     output = io.StringIO()
     print_doc(output=output)
     print_doc('address', output=output)
     print_doc('faker.providers.person.it_IT', output=output)
     assert output.getvalue()
Esempio n. 2
0
 def test_documentor(self):
     from faker.cli import print_doc
     print_doc()
     print_doc('address')
     print_doc('faker.providers.it_IT.person')
     self.assertRaises(AttributeError, self.generator.get_formatter,
                       'barFormatter')
Esempio n. 3
0
 def test_documentor(self):
     from faker.cli import print_doc
     print_doc()
     print_doc('address')
     print_doc('faker.providers.it_IT.person')
     self.assertRaises(AttributeError,
                       self.generator.get_formatter,
                       'barFormatter')
Esempio n. 4
0
 def test_documentor(self):
     from faker.cli import print_doc
     output = six.StringIO()
     print_doc(output=output)
     print_doc('address', output=output)
     print_doc('faker.providers.person.it_IT', output=output)
     assert output.getvalue()
     with pytest.raises(AttributeError):
         self.generator.get_formatter('barFormatter')
Esempio n. 5
0
 def test_documentor(self):
     from faker.cli import print_doc
     output = StringIO()
     print_doc(output=output)
     print_doc('address', output=output)
     print_doc('faker.providers.person.it_IT', output=output)
     assert output.getvalue()
     with self.assertRaises(AttributeError):
         self.generator.get_formatter('barFormatter')
Esempio n. 6
0
    def test_documentor(self):
        from faker.cli import print_doc

        output = StringIO()
        print_doc(output=output)
        print_doc("address", output=output)
        print_doc("faker.providers.person.it_IT", output=output)
        assert output.getvalue()
        self.assertRaises(AttributeError, self.generator.get_formatter, "barFormatter")
Esempio n. 7
0
 def test_documentor(self):
     from faker.cli import print_doc
     output = StringIO()
     print_doc(output=output)
     print_doc('address', output=output)
     print_doc('faker.providers.it_IT.person', output=output)
     assert output.getvalue()
     self.assertRaises(AttributeError, self.generator.get_formatter,
                       'barFormatter')