#NEWLINE# def test_simple( self ) : #NEWLINE# #INDENT# from changes.models import TestCase #NEWLINE# project = self . create_project ( ) #NEWLINE# build = self . create_build ( project = project ) #NEWLINE# job = self . create_job ( build = build ) #NEWLINE# testcase = self . create_test ( job = job , package = 'test.group.ClassName' , name = 'test_foo' , duration = 43 ) #NEWLINE# result = serialize ( testcase , { #NEWLINE# #INDENT# TestCase : GeneralizedTestCase ( ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( result [ 'hash' ] == testcase . name_sha ) #NEWLINE# assert ( result [ 'project' ] [ 'id' ] == str ( project . id . hex ) ) #NEWLINE# assert ( project [ 'shortName' ] == testcase . short_name ) #NEWLINE# assert ( result [ 'name' ] == testcase . name ) #NEWLINE# assert ( result [ 'package' ] == testcase . package ) #NEWLINE# assert ( result [ 'duration' ] == testcase . duration )