<s> from django . test import TestCase <EOL> from django . conf import settings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from app_metrics . utils import * <EOL> class MixpanelMetricConfigTests ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . old_backend = settings . APP_METRICS_BACKEND <EOL> settings . APP_METRICS_BACKEND = '<STR_LIT>' <EOL> def test_metric ( self ) : <EOL> self . assertRaises ( ImproperlyConfigured , metric , '<STR_LIT>' ) <EOL> def tearDown ( self ) : <EOL> settings . APP_METRICS_BACKEND = self . old_backend <EOL> class MixpanelCreationTests ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . old_backend = settings . APP_METRICS_BACKEND <EOL> self . old_token = settings . APP_METRICS_MIXPANEL_TOKEN <EOL> settings . APP_METRICS_BACKEND = '<STR_LIT>' <EOL> settings . APP_METRICS_MIXPANEL_TOKEN = '<STR_LIT>' <EOL> def test_metric ( self ) : <EOL> metric ( '<STR_LIT>' ) <EOL> def tearDown ( self ) : <EOL> settings . APP_METRICS_BACKEND = self . old_backend <EOL> settings . APP_METRICS_MIXPANEL_TOKEN = self . old_token </s>
