<s> import datetime <EOL> import pretend <EOL> from warehouse . packaging import search <EOL> def test_build_search ( ) : <EOL> release = pretend . stub ( <EOL> project = pretend . stub ( <EOL> name = "<STR_LIT>" , <EOL> normalized_name = "<STR_LIT>" , <EOL> releases = [ <EOL> pretend . stub ( version = "<STR_LIT:1.0>" ) , <EOL> pretend . stub ( version = "<STR_LIT>" ) , <EOL> pretend . stub ( version = "<STR_LIT>" ) , <EOL> pretend . stub ( version = "<STR_LIT>" ) , <EOL> ] , <EOL> ) , <EOL> summary = "<STR_LIT>" , <EOL> description = "<STR_LIT>" , <EOL> author = "<STR_LIT>" , <EOL> author_email = "<STR_LIT>" , <EOL> maintainer = "<STR_LIT>" , <EOL> maintainer_email = "<STR_LIT>" , <EOL> home_page = "<STR_LIT>" , <EOL> download_url = "<STR_LIT>" , <EOL> keywords = "<STR_LIT>" , <EOL> platform = "<STR_LIT>" , <EOL> created = datetime . datetime ( <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT> ) , <EOL> classifiers = [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> ) <EOL> obj = search . Project . from_db ( release ) <EOL> assert obj . meta . id == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT:name>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT:version>" ] == [ "<STR_LIT:1.0>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT:description>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == "<STR_LIT>" <EOL> assert obj [ "<STR_LIT>" ] == datetime . datetime ( <NUM_LIT> , <NUM_LIT:1> , <NUM_LIT> ) <EOL> assert obj [ "<STR_LIT>" ] == [ '<STR_LIT>' , '<STR_LIT>' ] </s>
