Skip to content

Commit

Permalink
Fixing tests for source/translator list
Browse files Browse the repository at this point in the history
  • Loading branch information
mwatts15 committed Oct 28, 2021
1 parent 77aef9a commit 584bf56
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/CommandTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,7 @@ def test_context_on_default_ctx(self):
class OWMTranslatorTest(unittest.TestCase):

def test_translator_list(self):
parent = Mock()
dct = dict()
dct['rdf.graph'] = Mock()
parent._conf.return_value = dct
parent = MagicMock()
# Mock the loading of DataObjects from the DataContext
parent._default_ctx.stored(ANY).query(conf=ANY).load.return_value = [Mock()]
ps = OWMTranslator(parent)
Expand Down Expand Up @@ -915,10 +912,7 @@ def test_set_user_object(self):

class OWMSourceTest(unittest.TestCase):
def test_list(self):
parent = Mock()
dct = dict()
dct['rdf.graph'] = Mock()
parent._conf.return_value = dct
parent = MagicMock()

# Mock the loading of DataObjects from the DataContext
def emptygen(): yield
Expand All @@ -927,10 +921,7 @@ def emptygen(): yield
self.assertIsNone(next(ps.list(), None))

def test_list_with_entry(self):
parent = Mock()
dct = dict()
dct['rdf.graph'] = Mock()
parent._conf.return_value = dct
parent = MagicMock()

# Mock the loading of DataObjects from the DataContext
def gen(): yield Mock()
Expand Down

0 comments on commit 584bf56

Please sign in to comment.