def test_command(self): from faker.cli import Command orig_stdout = sys.stdout try: sys.stdout = StringIO() command = Command(['faker', 'address']) command.execute() assert sys.stdout.getvalue() finally: sys.stdout = orig_stdout
def test_command(self): from faker.cli import Command orig_stdout = sys.stdout try: sys.stdout = six.StringIO() command = Command(['faker', 'address']) command.execute() assert sys.stdout.getvalue() finally: sys.stdout = orig_stdout
def test_command_custom_provider(self): from faker.cli import Command orig_stdout = sys.stdout try: sys.stdout = StringIO() command = Command(['faker', 'foo', '-i', 'tests.mymodule.en_US']) command.execute() assert sys.stdout.getvalue() finally: sys.stdout = orig_stdout
def test_command_custom_provider(self): from faker.cli import Command orig_stdout = sys.stdout try: sys.stdout = six.StringIO() command = Command(['faker', 'foo', '-i', 'tests.mymodule.en_US']) command.execute() assert sys.stdout.getvalue() finally: sys.stdout = orig_stdout
def test_command_custom_provider(self): from faker.cli import Command orig_stdout = sys.stdout try: sys.stdout = io.StringIO() command = Command(["faker", "foo", "-i", "tests.mymodule.en_US"]) command.execute() assert sys.stdout.getvalue() finally: sys.stdout = orig_stdout