pysss_murmur-test.py revision 73b68aa708e1ffa0e0ab5b021fa93ff3a0f484b1
# SSSD
#
# Unit tests for pysss_murmur
#
# Copyright (C) Sumit Bose <sbose@redhat.com> 2012
#
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import unittest
import sys
import os
import copy
if not srcdir:
srcdir = "."
# add compat methods for old unittest.TestCase versions
# (python < 2.7, RHEL5 for instance)
" Make sure we load the in-tree module "
" Restore the system path "
def testImport(self):
" Import the module and assert it comes from tree "
try:
import pysss_murmur
except ImportError, e:
raise e
def testExpectedHash(self):
def testInvalidArguments(self):
0xffffffffff)
0xffffffffff, 3)
if __name__ == "__main__":
error = 0
if not res.wasSuccessful():
error |= 0x1
# need to bail out here because pysss_murmur could not be imported
# import the pysss_murmur module into the global namespace, but make sure
# it's the one in tree
import pysss_murmur
if not res.wasSuccessful():
error |= 0x2