#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
#-----------------------------------------------------------------------------
# Modeling Framework: an Object-Relational Bridge for python
#
# Copyright (c) 2001-2004 Sbastien Bigaret <sbigaret@users.sourceforge.net>
# All rights reserved.
#
# This file is part of the Modeling Framework.
#
# This code is distributed under a "3-clause BSD"-style license;
# see the LICENSE file for details.
#-----------------------------------------------------------------------------
"""
Tests for FetchSpecification
"""
import unittest
if __name__ == "__main__":
import utils, sys
utils.fixpath()
from Modeling.FetchSpecification import FetchSpecification
class TestFetchSpecification(unittest.TestCase):
"""
Tests for FetchSpecification
"""
def test_01_detect_when_no_such_entity_is_loaded(self):
"[FetchSpecification] detects when the corresponding entity is not loaded"
# bug #916019
self.assertRaises(ValueError, FetchSpecification,'unknown')
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestFetchSpecification, "test_"))
return suite
if __name__ == "__main__":
errs = utils.run_suite(test_suite())
sys.exit(errs and 1 or 0)
|