| 10 | |
| 11 | |
| 12 | def test_input(example_app): |
| 13 | example_app.expect(textwrap.dedent("""\ |
| 14 | ? What's your first name """)) |
| 15 | example_app.writeline('John') |
| 16 | example_app.expect(textwrap.dedent("""\ |
| 17 | ? What's your first name John |
| 18 | ? What's your last name Doe""")) |
| 19 | example_app.write(keys.ENTER) |
| 20 | example_app.expect(textwrap.dedent("""\ |
| 21 | ? What's your last name Doe |
| 22 | ? What's your phone number """)) |
| 23 | example_app.writeline('0123456789') |
| 24 | example_app.expect(textwrap.dedent("""\ |
| 25 | ? What's your phone number 0123456789 |
| 26 | { |
| 27 | "first_name": "John", |
| 28 | "last_name": "Doe", |
| 29 | "phone": "0123456789" |
| 30 | } |
| 31 | |
| 32 | """)) |