~ubuntu-dev/ubuntu/lucid/atheist/lucid-201002101849

« back to all changes in this revision

Viewing changes to examples/remote1.test

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2009-09-14 13:36:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20090914133631-fi4cla3ohh7u88t6
Tags: upstream-0.20090921
ImportĀ upstreamĀ versionĀ 0.20090921

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- mode: python; coding: utf-8 -*-
2
 
 
3
 
import signal
4
 
 
5
 
babelTest = RemoteTestFactory('babel.esi.uclm.es')
6
 
babelTest('type nc')
7
 
 
8
 
server = babelTest('nc -lp 2000 -e /bin/cat',
9
 
                   detach=True)
10
 
server.pre += Not(OpenPort(2000, babelTest.host))
11
 
 
12
 
client = Test('echo hola | nc %s 2000' % babelTest.host,
13
 
              expected=1,
14
 
              delay=2,
15
 
              shell=True,
16
 
              timeout=1, signal=signal.SIGINT,
17
 
              save_stdout=True)
18
 
client.post += FileContains(client.stdout, "hola")
19