<s> from __future__ import unicode_literals , print_function , division <EOL> __author__ = "<STR_LIT>" <EOL> try : <EOL> import unittest2 as unittest <EOL> except ImportError : <EOL> import unittest <EOL> from ezodf . manifest import Manifest <EOL> testdata = b"""<STR_LIT>""" <EOL> class TestManifest ( unittest . TestCase ) : <EOL> def test_new_manifest ( self ) : <EOL> manifest = Manifest ( ) <EOL> result = manifest . tobytes ( ) <EOL> self . assertEqual ( result , b'<STR_LIT>' ) <EOL> def test_add_file ( self ) : <EOL> manifest = Manifest ( ) <EOL> manifest . add ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> result = manifest . tobytes ( ) <EOL> self . assertEqual ( result , <EOL> b'<STR_LIT>' b'<STR_LIT>' b'<STR_LIT>' b'<STR_LIT>' b'<STR_LIT>' b'<STR_LIT>' ) <EOL> def test_query_file ( self ) : <EOL> XML = '<STR_LIT>' <EOL> manifest = Manifest ( testdata ) <EOL> rootfile = manifest . find ( '<STR_LIT:/>' ) <EOL> self . assertEqual ( '<STR_LIT>' , rootfile . get ( XML + '<STR_LIT>' ) ) <EOL> rdf = manifest . find ( '<STR_LIT>' ) <EOL> self . assertEqual ( '<STR_LIT>' , rdf . get ( XML + '<STR_LIT>' ) ) <EOL> def test_query_file_not_found ( self ) : <EOL> manifest = Manifest ( testdata ) <EOL> result = manifest . find ( '<STR_LIT>' ) <EOL> self . assertIsNone ( result ) <EOL> def test_remove_file ( self ) : <EOL> manifest = Manifest ( testdata ) <EOL> result = manifest . find ( '<STR_LIT:/>' ) <EOL> self . assertIsNotNone ( result ) <EOL> manifest . remove ( '<STR_LIT:/>' ) <EOL> result = manifest . find ( '<STR_LIT:/>' ) <EOL> self . assertIsNone ( result ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
