# 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 tempfile
" Make sure we load the in-tree module "
print(MODPATH)
" Restore the system path "
" Import the module and assert it comes from tree "
try:
else:
import pysss_murmur
except ImportError as e:
print("Could not load the pysss_murmur module. "
raise e
seed = 12345
# length is off by one
seed)
0xffffffffff, seed)
sid_str = "S-1-5-21-2153326666-2176343378-3404031434"
seed = 0xdeadbeef
seed = 0xbeefdead
input_str = "test_user1"
if __name__ == "__main__":
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
if not res.wasSuccessful():
error |= 0x4