diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-06-14 20:39:14 +0200 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-06-14 20:39:14 +0200 |
commit | b67a983a02363bd17a4e6a96e650e65aa2d4eb7a (patch) | |
tree | 1a1f626fe750b1ecc7eb8c57ec5409161832f07c /mediagoblin/tests/test_workbench.py | |
parent | 8bfa533f8b438e57a7950a8dcd02a275cbfa19df (diff) | |
download | mediagoblin-b67a983a02363bd17a4e6a96e650e65aa2d4eb7a.tar.lz mediagoblin-b67a983a02363bd17a4e6a96e650e65aa2d4eb7a.tar.xz mediagoblin-b67a983a02363bd17a4e6a96e650e65aa2d4eb7a.zip |
Move destroy_workbench to Workbench class
And add a lot of warnings, as the checks for "being part of
the main Manager" are all gone.
Diffstat (limited to 'mediagoblin/tests/test_workbench.py')
-rw-r--r-- | mediagoblin/tests/test_workbench.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mediagoblin/tests/test_workbench.py b/mediagoblin/tests/test_workbench.py index db27dfc6..953835a1 100644 --- a/mediagoblin/tests/test_workbench.py +++ b/mediagoblin/tests/test_workbench.py @@ -37,7 +37,7 @@ class TestWorkbench(object): this_workbench = self.workbench_manager.create_workbench() tmpname = this_workbench.joinpath('temp.txt') assert tmpname == os.path.join(this_workbench.dir, 'temp.txt') - self.workbench_manager.destroy_workbench(this_workbench) + this_workbench.destroy_self() def test_destroy_workbench(self): # kill a workbench @@ -49,17 +49,10 @@ class TestWorkbench(object): assert os.path.exists(tmpfile_name) - self.workbench_manager.destroy_workbench(this_workbench) + wb_dir = this_workbench.dir + this_workbench.destroy_self() assert not os.path.exists(tmpfile_name) - assert not os.path.exists(this_workbench.dir) - - # make sure we can't kill other stuff though - dont_kill_this = workbench.Workbench(tempfile.mkdtemp()) - - assert_raises( - workbench.WorkbenchOutsideScope, - self.workbench_manager.destroy_workbench, - dont_kill_this) + assert not os.path.exists(wb_dir) def test_localized_file(self): tmpdir, this_storage = get_tmp_filestorage() |