<s> import time <EOL> import unittest <EOL> from geeknote . geeknote import * <EOL> from geeknote import tools <EOL> from geeknote . editor import Editor <EOL> class GeekNoteOver ( GeekNote ) : <EOL> def __init__ ( self ) : <EOL> pass <EOL> def loadNoteContent ( self , note ) : <EOL> note . content = "<STR_LIT>" <EOL> class NotesOver ( Notes ) : <EOL> def connectToEvertone ( self ) : <EOL> self . evernote = GeekNoteOver ( ) <EOL> class testNotes ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . notes = NotesOver ( ) <EOL> self . testNote = tools . Struct ( title = "<STR_LIT>" ) <EOL> def test_parseInput1 ( self ) : <EOL> testData = self . notes . _parseInput ( "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT>" ) <EOL> self . assertTrue ( isinstance ( testData , dict ) ) <EOL> if not isinstance ( testData , dict ) : <EOL> return <EOL> self . assertEqual ( testData [ '<STR_LIT:title>' ] , "<STR_LIT:title>" ) <EOL> self . assertEqual ( testData [ '<STR_LIT:content>' ] , Editor . textToENML ( "<STR_LIT>" ) ) <EOL> self . assertEqual ( testData [ "<STR_LIT>" ] , [ "<STR_LIT>" , ] ) <EOL> def test_parseInput2 ( self ) : <EOL> testData = self . notes . _parseInput ( "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> None , self . testNote ) <EOL> self . assertTrue ( isinstance ( testData , dict ) ) <EOL> if not isinstance ( testData , dict ) : <EOL> return <EOL> self . assertEqual ( testData [ '<STR_LIT:title>' ] , "<STR_LIT:title>" ) <EOL> self . assertEqual ( <EOL> testData [ '<STR_LIT:content>' ] , <EOL> "<STR_LIT>" <EOL> ) <EOL> self . assertEqual ( testData [ "<STR_LIT>" ] , [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> def test_editWithEditorInThread ( self ) : <EOL> testData = self . notes . _parseInput ( "<STR_LIT:title>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> None , self . testNote ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( testData ) <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> self . notes . _editWithEditorInThread ( testData ) <EOL> def test_createSearchRequest1 ( self ) : <EOL> testRequest = self . notes . _createSearchRequest ( <EOL> search = "<STR_LIT>" , <EOL> tags = "<STR_LIT>" , <EOL> notebooks = "<STR_LIT>" , <EOL> date = "<STR_LIT>" , <EOL> exact_entry = True , <EOL> content_search = True <EOL> ) <EOL> response = '<STR_LIT>' '<STR_LIT>' <EOL> self . assertEqual ( testRequest , response ) <EOL> def test_createSearchRequest2 ( self ) : <EOL> testRequest = self . notes . _createSearchRequest ( <EOL> search = "<STR_LIT>" , <EOL> tags = "<STR_LIT>" , <EOL> notebooks = "<STR_LIT>" , <EOL> date = "<STR_LIT>" , <EOL> exact_entry = False , <EOL> content_search = False <EOL> ) <EOL> response = '<STR_LIT>' '<STR_LIT>' '<STR_LIT>' <EOL> self . assertEqual ( testRequest , response ) <EOL> def testError_createSearchRequest1 ( self ) : <EOL> testRequest = self . notes . _createSearchRequest ( search = "<STR_LIT>" , <EOL> date = "<STR_LIT>" ) <EOL> self . assertEqual ( testRequest , '<STR_LIT>' ) </s>
