<s> from . import TestController <EOL> from sword2 import Atom_Sword_Statement , Ore_Sword_Statement <EOL> from sword2 . utils import NS <EOL> from datetime import datetime <EOL> ATOM_TEST_STATEMENT = """<STR_LIT>""" <EOL> ORE_TEST_STATEMENT = """<STR_LIT>""" <EOL> class TestStatement ( TestController ) : <EOL> def test_01_atom_blank_init ( self ) : <EOL> s = Atom_Sword_Statement ( ) <EOL> assert len ( s . original_deposits ) == <NUM_LIT:0> <EOL> assert len ( s . resources ) == <NUM_LIT:0> <EOL> assert len ( s . states ) == <NUM_LIT:0> <EOL> assert s . xml_document == None <EOL> assert s . dom == None <EOL> assert not s . parsed <EOL> assert not s . valid <EOL> def test_02_atom_init_with_statement ( self ) : <EOL> s = Atom_Sword_Statement ( ATOM_TEST_STATEMENT ) <EOL> assert len ( s . states ) == <NUM_LIT:1> <EOL> assert len ( s . original_deposits ) == <NUM_LIT:1> <EOL> assert len ( s . resources ) == <NUM_LIT:1> <EOL> assert s . xml_document != None <EOL> assert s . dom != None <EOL> assert s . parsed <EOL> assert s . valid <EOL> uri , description = s . states [ <NUM_LIT:0> ] <EOL> assert uri == "<STR_LIT>" <EOL> assert description == "<STR_LIT>" <EOL> t = datetime . strptime ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> entry = s . resources [ <NUM_LIT:0> ] <EOL> assert len ( entry . packaging ) == <NUM_LIT:1> <EOL> assert entry . deposited_by == "<STR_LIT>" <EOL> assert entry . deposited_on_behalf_of == "<STR_LIT>" <EOL> assert entry . deposited_on == t <EOL> assert entry . uri == "<STR_LIT>" <EOL> assert entry . packaging [ <NUM_LIT:0> ] == "<STR_LIT>" <EOL> def test_03_ore_blank_init ( self ) : <EOL> s = Ore_Sword_Statement ( ) <EOL> assert len ( s . original_deposits ) == <NUM_LIT:0> <EOL> assert len ( s . resources ) == <NUM_LIT:0> <EOL> assert len ( s . states ) == <NUM_LIT:0> <EOL> assert s . xml_document == None <EOL> assert s . dom == None <EOL> assert not s . parsed <EOL> assert not s . valid <EOL> def test_04_ore_init_with_statement ( self ) : <EOL> s = Ore_Sword_Statement ( ORE_TEST_STATEMENT ) <EOL> assert len ( s . states ) == <NUM_LIT:1> <EOL> assert len ( s . original_deposits ) == <NUM_LIT:1> <EOL> assert len ( s . resources ) == <NUM_LIT:1> <EOL> assert s . xml_document != None <EOL> assert s . dom != None <EOL> assert s . parsed <EOL> assert s . valid <EOL> uri , description = s . states [ <NUM_LIT:0> ] <EOL> assert uri == "<STR_LIT>" <EOL> assert description == "<STR_LIT>" <EOL> t = datetime . strptime ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> entry = s . resources [ <NUM_LIT:0> ] <EOL> assert len ( entry . packaging ) == <NUM_LIT:1> <EOL> assert entry . deposited_by == "<STR_LIT>" <EOL> assert entry . deposited_on_behalf_of == "<STR_LIT>" <EOL> assert entry . deposited_on == t <EOL> assert entry . uri == "<STR_LIT>" <EOL> assert entry . packaging [ <NUM_LIT:0> ] == "<STR_LIT>" </s>
