<s> from __future__ import absolute_import <EOL> from datetime import datetime <EOL> from sentry . testutils import APITestCase <EOL> class GroupEventsOldestTest ( APITestCase ) : <EOL> def test_simple ( self ) : <EOL> self . login_as ( user = self . user ) <EOL> group = self . create_group ( ) <EOL> event_1 = self . create_event ( <EOL> event_id = '<STR_LIT:a>' , <EOL> group = group , <EOL> datetime = datetime ( <NUM_LIT> , <NUM_LIT:8> , <NUM_LIT> , <NUM_LIT:3> , <NUM_LIT:8> , <NUM_LIT> ) , <EOL> ) <EOL> self . create_event ( <EOL> event_id = '<STR_LIT:b>' , <EOL> group = group , <EOL> datetime = datetime ( <NUM_LIT> , <NUM_LIT:8> , <NUM_LIT> , <NUM_LIT:3> , <NUM_LIT:8> , <NUM_LIT> ) , <EOL> ) <EOL> url = '<STR_LIT>' . format ( group . id ) <EOL> response = self . client . get ( url , format = '<STR_LIT>' ) <EOL> assert response . status_code == <NUM_LIT:200> <EOL> assert response . data [ '<STR_LIT:id>' ] == str ( event_1 . id ) </s>
