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

from mock import patch
from django.test import TestCase
from contrib.commands import BaseCommand


class BaseCommandTest(TestCase):
    @patch('sys.stdout')
    def test_notice_message(self, stdout):
        class Command(BaseCommand):
            def handle(self, *args, **options):
                self.notice('asd')
                self.notice(u'йцукен')
                self.notice('\xc3\x86')

        Command().execute()
        self.assertEqual(stdout.write.call_count, 3)

    @patch('sys.stderr')
    def test_error_message(self, stderr):
        class Command(BaseCommand):
            def handle(self, *args, **options):
                self.error('asd')
                self.error(u'йцукен')
                self.error('\xc3\x86')

        Command().execute()
        self.assertEqual(stderr.write.call_count, 3)

c900715e3978dce15a636321541427c18368180c
<mask token>


class BaseCommandTest(TestCase):
    <mask token>
    <mask token>

<mask token>


class BaseCommandTest(TestCase):
    <mask token>

    @patch('sys.stderr')
    def test_error_message(self, stderr):


        class Command(BaseCommand):

            def handle(self, *args, **options):
                self.error('asd')
                self.error(u'йцукен')
                self.error('Ã\x86')
        Command().execute()
        self.assertEqual(stderr.write.call_count, 3)

<mask token>


class BaseCommandTest(TestCase):

    @patch('sys.stdout')
    def test_notice_message(self, stdout):


        class Command(BaseCommand):

            def handle(self, *args, **options):
                self.notice('asd')
                self.notice(u'йцукен')
                self.notice('Ã\x86')
        Command().execute()
        self.assertEqual(stdout.write.call_count, 3)

    @patch('sys.stderr')
    def test_error_message(self, stderr):


        class Command(BaseCommand):

            def handle(self, *args, **options):
                self.error('asd')
                self.error(u'йцукен')
                self.error('Ã\x86')
        Command().execute()
        self.assertEqual(stderr.write.call_count, 3)

from mock import patch
from django.test import TestCase
from contrib.commands import BaseCommand


class BaseCommandTest(TestCase):

    @patch('sys.stdout')
    def test_notice_message(self, stdout):


        class Command(BaseCommand):

            def handle(self, *args, **options):
                self.notice('asd')
                self.notice(u'йцукен')
                self.notice('Ã\x86')
        Command().execute()
        self.assertEqual(stdout.write.call_count, 3)

    @patch('sys.stderr')
    def test_error_message(self, stderr):


        class Command(BaseCommand):

            def handle(self, *args, **options):
                self.error('asd')
                self.error(u'йцукен')
                self.error('Ã\x86')
        Command().execute()
        self.assertEqual(stderr.write.call_count, 3)

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

from mock import patch
from django.test import TestCase
from contrib.commands import BaseCommand


class BaseCommandTest(TestCase):
    @patch('sys.stdout')
    def test_notice_message(self, stdout):
        class Command(BaseCommand):
            def handle(self, *args, **options):
                self.notice('asd')
                self.notice(u'йцукен')
                self.notice('\xc3\x86')

        Command().execute()
        self.assertEqual(stdout.write.call_count, 3)

    @patch('sys.stderr')
    def test_error_message(self, stderr):
        class Command(BaseCommand):
            def handle(self, *args, **options):
                self.error('asd')
                self.error(u'йцукен')
                self.error('\xc3\x86')

        Command().execute()
        self.assertEqual(stderr.write.call_count, 3)
