<s> from samba import param <EOL> from samba . credentials import Credentials <EOL> from samba . tests import TestCaseInTempDir <EOL> from samba . tests . samdb import SamDBTestCase <EOL> from openchange . provision import ( install_schemas , openchangedb_provision , <EOL> guess_names_from_smbconf , find_setup_dir ) <EOL> import os <EOL> import shutil <EOL> class ExtendedSamDBTestCase ( SamDBTestCase ) : <EOL> def test_install_schemas ( self ) : <EOL> def setup_path ( relpath ) : <EOL> return os . path . join ( find_setup_dir ( ) , relpath ) <EOL> names = guess_names_from_smbconf ( self . lp ) <EOL> creds = Credentials ( ) <EOL> creds . set_anonymous ( ) <EOL> self . lp . set ( "<STR_LIT>" , os . path . join ( self . tempdir , "<STR_LIT>" ) ) <EOL> install_schemas ( setup_path , names , self . lp , creds ) <EOL> class OpenChangeDBProvisionTestCase ( TestCaseInTempDir ) : <EOL> def test_provision ( self ) : <EOL> lp = param . LoadParm ( ) <EOL> lp . load_default ( ) <EOL> lp . set ( "<STR_LIT>" , self . tempdir ) <EOL> openchangedb_provision ( lp ) <EOL> shutil . rmtree ( os . path . join ( self . tempdir , "<STR_LIT>" ) ) <EOL> os . unlink ( os . path . join ( self . tempdir , "<STR_LIT>" ) ) </s>
