def test_item_lookup(self, mock_get): mockSession = MagicMock() mockSession.query().get.return_value = True self.assertTrue(Item.lookup(mockSession, ['id1'])) mockSession.query().get.assert_called_once_with(True)
def test_item_lookup(self, mock_get): self.assertTrue(Item.lookup('session', ['id1']))