diff --git a/tests/test_progitlib.py b/tests/test_progitlib.py new file mode 100644 index 0000000..cb3fa6d --- /dev/null +++ b/tests/test_progitlib.py @@ -0,0 +1,36 @@ +#-*- coding: utf-8 -*- + +""" + (c) 2015 - Copyright Red Hat Inc + + Authors: + Pierre-Yves Chibon + +""" + +__requires__ = ['SQLAlchemy >= 0.8'] +import pkg_resources + +import unittest +import sys +import os + +sys.path.insert(0, os.path.join(os.path.dirname( + os.path.abspath(__file__)), '..')) + +import progit.lib +from tests import Modeltests, create_projects + + +class ProgitLibtests(Modeltests): + """ Tests for progit.lib """ + + def test_get_next_id(self): + """ Test the get_next_id function of progit.lib. """ + create_projects(self.session) + self.assertEqual(1, progit.lib.get_next_id(self.session, 1)) + + +if __name__ == '__main__': + SUITE = unittest.TestLoader().loadTestsFromTestCase(ProgitLibtests) + unittest.TextTestRunner(verbosity=2).run(SUITE)