# -*- coding: utf-8 -*-

from __future__ import absolute_import

from sentry import app
from sentry.testutils import TestCase


class AppTest(TestCase):
    def test_buffer_is_a_buffer(self):
        from sentry.buffer.base import Buffer
        self.assertEquals(type(app.buffer), Buffer)

@@ -58,16 +58,29 @@
 import%0A%0A
+import mock%0A%0A
 from sen
@@ -296,8 +296,601 @@
 Buffer)%0A
+%0A%0Aclass GetBufferTest(TestCase):%0A    def test_raises_import_error_on_invalid_path(self):%0A        with self.assertRaises(ImportError):%0A            app.get_buffer('lol.FooBar', %7B%7D)%0A%0A    @mock.patch('sentry.app.import_string')%0A    def test_instantiates_class_with_options(self, import_string):%0A        options = %7B'hello': 'world'%7D%0A        path = 'lol.FooBar'%0A%0A        result = app.get_buffer(path, options)%0A%0A        import_string.assert_called_once_with(path)%0A        import_string.return_value.assert_called_once_with(**options)%0A%0A        assert result == import_string.return_value.return_value%0A

Add tests for get_buffer