concordia-server/unit-tests/concordiaSearchTest.py

25 lines
600 B
Python
Raw Normal View History

2015-06-09 13:01:42 +02:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
class ConcordiaSearchTest(unittest.TestCase):
def setUp(self):
print "set up concordia search"
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
# check that s.split fails when the separator is not a string
with self.assertRaises(TypeError):
s.split(2)