From 250e067316d2789c02b253e24d670d2d8f85302d Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 15 May 2016 23:26:10 +0200 Subject: inspectors : refactor done --- tests/test_discovery.py | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'tests') diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 7fb0bd2..06c61e3 100755 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -3,30 +3,12 @@ import unittest #import pudb; pudb.set_trace() from context import haircontrol -from haircontrol import discovery, data, inspectors - -class MockInspector(inspectors.Inspector): - def __init__(self, testDataPath): - self.testDataPath = testDataPath - self.e = None - - def connect(self, e): - self.e = e - - def disconnect(self): - self.e = None - - def command(self, command): - if not self.e: - return None - mockfile = self.testDataPath + '/' + self.e.name + '-' + command + '.out' - return open(mockfile) #XXX use Inspector.parse() - +from haircontrol import discovery, data #, inspectors class TestDiscovery(unittest.TestCase): def setUp(self): - self.discovery = discovery.Discovery(MockInspector('../test-data/input')) + self.discovery = discovery.Discovery() #MockInspector('../test-data/input')) self.maxDiff=None def test_wire_graph(self): -- cgit v1.1