~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/poppy/tests/test_twistedsftp.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-02 01:27:41 UTC
  • mfrom: (14396.7.14 nest-temp-files)
  • Revision ID: launchpad@pqm.canonical.com-20111202012741-qxx3enakaxwkbk8x
[r=jcsackett][no-qa] New fixture NestedTempfile to temporarily move
        tempfile's default tempdir location itself to a temporary directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
from lp.poppy.twistedsftp import SFTPServer
13
13
from lp.services.sshserver.sftp import FileIsADirectory
14
 
from lp.testing import TestCase
 
14
from lp.testing import (
 
15
    NestedTempfile,
 
16
    TestCase,
 
17
    )
15
18
 
16
19
 
17
20
class TestSFTPServer(TestCase):
18
21
 
19
22
    def setUp(self):
 
23
        self.useFixture(NestedTempfile())
20
24
        self.fs_root = self.useFixture(TempDir()).path
21
25
        self.sftp_server = SFTPServer(None, self.fs_root)
22
26
        super(TestSFTPServer, self).setUp()