<s> __author__ = "<STR_LIT>" <EOL> __email__ = "<STR_LIT>" <EOL> __description__ = "<STR_LIT>" <EOL> import unittest <EOL> import os <EOL> import phonebook <EOL> dbname_test = '<STR_LIT>' <EOL> class BasicsTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> phonebook . create_db ( dbname = dbname_test ) <EOL> phonebook . add_entry ( values = [ '<STR_LIT>' , '<STR_LIT>' ] , dbname = dbname_test ) <EOL> def tearDown ( self ) : <EOL> if os . path . isfile ( dbname_test ) : <EOL> return os . remove ( dbname_test ) <EOL> def test_find_name ( self ) : <EOL> self . assertTrue ( phonebook . find_name ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> self . assertFalse ( phonebook . find_name ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> def test_find_num ( self ) : <EOL> self . assertTrue ( phonebook . find_phone ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> self . assertFalse ( phonebook . find_phone ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> def test_change ( self ) : <EOL> phonebook . change_number ( values = [ '<STR_LIT>' , '<STR_LIT>' ] , dbname = dbname_test ) <EOL> self . assertTrue ( phonebook . find_phone ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> def test_del ( self ) : <EOL> phonebook . del_entry ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) <EOL> self . assertFalse ( phonebook . find_name ( values = [ '<STR_LIT>' ] , dbname = dbname_test ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
