import unittest
from liveblog.blogs.blogs import BlogService
from superdesk.errors import SuperdeskApiError

class BlogsTestCase(unittest.TestCase):

    def setUp(self):
        pass

    def test_if_check_max_active(self):
        increment = 10
        """so if check "subscription in SUBSCRIPTION_MAX_ACTIVE_BLOGS" pass in method \
        _check_max_active it will create exception"""
        error_reach_maximum = False
        try:
            BlogService()._check_max_active(increment)
        except:
            error_reach_maximum = True
        self.assertEqual(error_reach_maximum, True)

@@ -1,58 +1,113 @@
+from liveblog.blogs 
 import 
-unittest%0Afrom liveblog.blogs.blogs import BlogS
+init_app%0Afrom superdesk.tests import TestCase%0Afrom superdesk import get_resource_s
 ervi
@@ -157,16 +157,17 @@
 iError%0A%0A
+%0A
 class Bl
@@ -182,17 +182,8 @@
 ase(
-unittest.
 Test
@@ -219,20 +219,90 @@
         
-pass
+# from nose.tools import set_trace; set_trace()%0A        init_app(self.app)
 %0A%0A    de
@@ -311,16 +311,20 @@
 test_if_
+not_
 check_ma
@@ -363,9 +363,8 @@
 t = 
-1
 0%0A  
@@ -373,349 +373,272 @@
     
-%22%22%22so if check %22subscription in SUBSCRIPTION_MAX_ACTIVE_BLOGS%22 pass in method %5C%0A        _check_max_active it will create exception%22%22%22%0A        error_reach_maximum = False%0A        try:%0A            BlogService()._check_max_active(increment)%0A        except:%0A            error_reach_maximum = True%0A        self.assertEqual(error_reach_maximum, True
+self.assertEqual(get_resource_service('blogs')._check_max_active(increment), None)%0A%0A    def test_if_check_max_active(self):%0A        increment = 5%0A        with self.assertRaises(SuperdeskApiError):%0A            get_resource_service('blogs')._check_max_active(increment
 )%0A

Test case: _check_max_active method to check both scenarios