<s> from __future__ import absolute_import <EOL> from sentry . testutils import APITestCase <EOL> class GroupEventsTest ( APITestCase ) : <EOL> def test_simple ( self ) : <EOL> self . login_as ( user = self . user ) <EOL> group = self . create_group ( ) <EOL> event_1 = self . create_event ( '<STR_LIT:a>' * <NUM_LIT:32> , group = group ) <EOL> event_2 = self . create_event ( '<STR_LIT:b>' * <NUM_LIT:32> , group = group ) <EOL> url = '<STR_LIT>' . format ( group . id ) <EOL> response = self . client . get ( url , format = '<STR_LIT>' ) <EOL> assert response . status_code == <NUM_LIT:200> , response . content <EOL> assert len ( response . data ) == <NUM_LIT:2> <EOL> assert sorted ( map ( lambda x : x [ '<STR_LIT:id>' ] , response . data ) ) == sorted ( [ <EOL> str ( event_1 . id ) , <EOL> str ( event_2 . id ) , <EOL> ] ) </s>
