Skip to content

Commit

Permalink
Remove test that should be downstream
Browse files Browse the repository at this point in the history
  • Loading branch information
afshin committed Sep 29, 2020
1 parent dff30eb commit cefdafe
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions tests/test_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,40 +70,3 @@ async def test_terminal_create_with_kwargs(fetch, ws_fetch, terminal_path, kill_

assert data['name'] == term_name
await kill_all()


async def test_terminal_create_with_cwd(
fetch,
ws_fetch,
terminal_path,
kill_all
):
resp = await fetch(
'api', 'terminals',
method='POST',
body=json.dumps({'cwd': str(terminal_path)}),
allow_nonstandard_methods=True,
)

data = json.loads(resp.body.decode())
term_name = data['name']

ws = await ws_fetch(
'terminals', 'websocket', term_name
)
await ws.write_message(json.dumps(['stdin', 'pwd\r']))

messages = ""
while True:
try:
response = await asyncio.wait_for(ws.read_message(), timeout=1.0)
except asyncio.TimeoutError:
return messages

response = json.loads(response)
if response[0] == "stdout":
messages += response[1]

ws.close()
assert str(terminal_path) in messages
await kill_all()

0 comments on commit cefdafe

Please sign in to comment.