shell bypass 403
曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.かつては雑草やヨモギと共に雨や露を分かち合っていたが、今では松やヒノキと共に霜や雪に耐えている。曾与蒿藜同雨露,Once sharing rain and dew with weeds and wormwood, now enduring frost and snow with pines and cypresses.终随松柏到冰霜.曾与蒿藜同雨露한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.,终随松柏到冰霜.譖セ荳手珍阯懷酔髮ィ髴イ�檎サ磯囂譚セ譟丞芦蜀ー髴�曾与蒿藜同雨露,鏇句笌钂胯棞鍚岄洦闇诧紝缁堥殢鏉炬煆鍒板啺闇�终随松柏到冰霜.曾与蒿藜同雨露,한때 잡초와 쑥과 함께 비와 이슬을 나누던 곳이 이제는 소나무와 삼나무와 함께 서리와 눈을 견뎌내고 있다.终随松柏到冰霜.曾与蒿藜同雨露,终随松柏到冰霜.
# Copyright (c) 2016, Matt Layman
import argparse
import os
try:
from unittest import mock
except ImportError:
import mock
from tap.loader import Loader
from tap.main import build_suite, get_status, main, parse_args
from tap.tests import TestCase
class TestMain(TestCase):
"""Tests for tap.main"""
def test_exits_with_error(self):
"""The main function returns an error status if there were failures."""
argv = ['/bin/fake', 'fake.tap']
stream = open(os.devnull, 'w')
status = main(argv, stream=stream)
self.assertEqual(1, status)
def test_get_successful_status(self):
result = mock.Mock()
result.wasSuccessful.return_value = True
self.assertEqual(0, get_status(result))
@mock.patch.object(Loader, 'load_suite_from_stdin')
def test_build_suite_from_stdin(self, load_suite_from_stdin):
args = mock.Mock()
args.files = []
expected_suite = mock.Mock()
load_suite_from_stdin.return_value = expected_suite
suite = build_suite(args)
self.assertEqual(expected_suite, suite)
@mock.patch.object(Loader, 'load_suite_from_stdin')
def test_build_suite_from_stdin_dash(self, load_suite_from_stdin):
argv = ['/bin/fake', '-']
args = parse_args(argv)
expected_suite = mock.Mock()
load_suite_from_stdin.return_value = expected_suite
suite = build_suite(args)
self.assertEqual(expected_suite, suite)
@mock.patch('tap.main.sys.stdin')
@mock.patch('tap.main.sys.exit')
@mock.patch.object(argparse.ArgumentParser, 'print_help')
def test_when_no_pipe_to_stdin(self, print_help, sys_exit, mock_stdin):
argv = ['/bin/fake']
mock_stdin.isatty = mock.Mock(return_value=True)
parse_args(argv)
self.assertTrue(print_help.called)
self.assertTrue(sys_exit.called)