<s> from __future__ import absolute_import <EOL> from sentry . models import Activity <EOL> from sentry . testutils import APITestCase <EOL> class OrganizationActivityTest ( APITestCase ) : <EOL> def test_simple ( self ) : <EOL> group = self . group <EOL> org = group . organization <EOL> activity = Activity . objects . create ( <EOL> group = group , <EOL> project = group . project , <EOL> type = Activity . NOTE , <EOL> user = self . user , <EOL> data = { '<STR_LIT:text>' : '<STR_LIT>' } , <EOL> ) <EOL> self . login_as ( user = self . user ) <EOL> url = '<STR_LIT>' . format ( org . slug ) <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:1> <EOL> assert response . data [ <NUM_LIT:0> ] [ '<STR_LIT:id>' ] == str ( activity . id ) </s>
