# Path: tests/base.py
# class APITestCase(APITestCase):
#     client_class = APIClient


from .base import APITestCase
from django.core.management import call_command
    from StringIO import StringIO
    from io import StringIO
import json
try:
except ImportError:


class CommandTestCase(APITestCase):
    def check_config(self, text):
        data = json.loads(text)
        self.assertIn('pages', data)
        page = list(data['pages'].values())[0]
        self.assertIn('url', page)

    def test_dump_config_json(self):
        f = StringIO()
        call_command('dump_config', stdout=f)
        self.check_config(f.getvalue())

    def test_dump_config_amd(self):
        f = StringIO()
        call_command('dump_config', format='amd', stdout=f)
        text = f.getvalue().strip()

# Path: tests/base.py
# class APITestCase(APITestCase):
#     client_class = APIClient


# Path: tests/test_commands.py
from .base import APITestCase
from django.core.management import call_command
    from StringIO import StringIO
    from io import StringIO
import json

try:
except ImportError:


class CommandTestCase(APITestCase):
    def check_config(self, text):
        data = json.loads(text)
        self.assertIn('pages', data)
        page = list(data['pages'].values())[0]
        self.assertIn('url', page)

    def test_dump_config_json(self):
        f = StringIO()
        call_command('dump_config', stdout=f)
        self.check_config(f.getvalue())

    def test_dump_config_amd(self):
        f = StringIO()
        call_command('dump_config', format='amd', stdout=f)
        text = f.getvalue().strip()

        self.assertTrue(