# -*- coding: utf-8 -*-
# $Id: BackendTestCase.py 1603 2011-10-10 12:33:02Z amelung $
#
# Copyright (c) 2007-2011 Otto-von-Guericke-Universität Magdeburg
#
# This file is part of ECSpooler.
import unittest
import socket
from backends import *
"""
"""
"""
Set up before test method runs
"""
#self.port = random.randint(self.port, self.port + 100)
"""
Tidy up after test method has been run
"""
pass
"""Backend instance should fail with no input"""
try:
params = {}
except AssertionError, err:
"""Backend instance should fail with improper input"""
try:
#print 'xxx: %s(params)' % self.backendClassName
except AssertionError, err:
#except Exception, e:
# import traceback
# traceback.print_exc()
"""Backend instance should not fail with all required attributes"""
# try:
# params = self.params
# exec '%s(params)' % self.backendClassName
# except Exception, err:
# self.assertFalse('Exception raised: %s' % repr(err))
# else:
# self.assertTrue('No Exception raised.')
"""_process_execute should always return an instance of 'BackendResult'"""
result = None
#exec 'backend = %s(self.params)' % self.backendClassName
#backend = Scheme(self.params)
#result = backend._process_execute(self.job)
if result:
"Returned object is not an instance of BackendResult")
else:
"""_process_execute should return an instance of 'BackendResult' with error code -217 if no test spec was selected"""
result = None
if result:
else: