summaryrefslogtreecommitdiffstats
path: root/testsuite/Testlib/TestServer/TestPlugins
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 17:06:35 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 17:06:35 -0400
commit556ac5660c22eb8316bff03cc3ccec5c82005b7c (patch)
treecd1829f50f535e4580b1a2ca6de89e45d5280526 /testsuite/Testlib/TestServer/TestPlugins
parent52b01a5a0a308f05affad9b72e2c1406cb807021 (diff)
downloadbcfg2-556ac5660c22eb8316bff03cc3ccec5c82005b7c.tar.gz
bcfg2-556ac5660c22eb8316bff03cc3ccec5c82005b7c.tar.bz2
bcfg2-556ac5660c22eb8316bff03cc3ccec5c82005b7c.zip
removed context managers from unit tests
Diffstat (limited to 'testsuite/Testlib/TestServer/TestPlugins')
-rw-r--r--testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py1
-rw-r--r--testsuite/Testlib/TestServer/TestPlugins/TestProbes.py7
2 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py b/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py
index 7382a4439..5dcd84a0c 100644
--- a/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py
+++ b/testsuite/Testlib/TestServer/TestPlugins/TestMetadata.py
@@ -3,7 +3,6 @@ import sys
import copy
import time
import socket
-import unittest
import lxml.etree
from mock import Mock, patch
from ....common import *
diff --git a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py
index df9248e50..38161215d 100644
--- a/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py
+++ b/testsuite/Testlib/TestServer/TestPlugins/TestProbes.py
@@ -1,7 +1,6 @@
import os
import sys
import time
-import unittest
import lxml.etree
from mock import Mock, MagicMock, patch
from ....common import *
@@ -228,9 +227,11 @@ text
# test__init(), which relies on being able to check the calls
# of load_data(), and thus on load_data() being consistently
# mocked)
- with patch("Bcfg2.Server.Plugins.Probes.Probes.load_data",
- new=load_data):
+ @patch("Bcfg2.Server.Plugins.Probes.Probes.load_data", new=load_data)
+ def inner():
return Probes(core, datastore)
+
+ return inner()
def test__init(self):
mock_load_data = Mock()