@@ -0,0 +1,1240 @@
+# -*- coding: utf-8 -*-%0A%0A#%0A# Copyright 2015 Jun-ya HASEBA%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A#%0A%0Afrom unittest import TestCase%0A%0A%0Aclass ApiTest(TestCase):%0A    %22%22%22%0A    api.py%E3%81%AB%E5%AF%BE%E3%81%99%E3%82%8B%E3%83%86%E3%82%B9%E3%83%88%E3%82%B3%E3%83%BC%E3%83%89%E3%80%82%0A    %22%22%22%0A%0A    def test_get_item_count_01(self):%0A        %22%22%22%0A        %5B%E5%AF%BE%E8%B1%A1%5D get_item_count()%0A        %5B%E6%9D%A1%E4%BB%B6%5D %E6%9C%89%E5%8A%B9%E3%81%AA%E3%83%AC%E3%82%A4%E3%83%A4ID%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%A6%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%99%E3%80%82%0A        %5B%E7%B5%90%E6%9E%9C%5D %E4%BB%B6%E6%95%B0%E3%81%8C%E3%81%8C%E8%BF%94%E3%81%95%E3%82%8C%E3%82%8B%E3%81%93%E3%81%A8%E3%80%82%0A        %22%22%22%0A        from pyny import api%0A        actual = api.get_item_count('c1120')%0A%0A        self.assertEqual(71, actual)%0A%0A    def test_get_item_count_02(self):%0A        %22%22%22%0A        %5B%E5%AF%BE%E8%B1%A1%5D get_item_count()%0A        %5B%E6%9D%A1%E4%BB%B6%5D %E7%84%A1%E5%8A%B9%E3%81%AA%E3%83%AC%E3%82%A4%E3%83%A4ID%E3%82%92%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%A6%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%99%E3%80%82%0A        %5B%E7%B5%90%E6%9E%9C%5D PynyError%E3%81%8C%E9%80%81%E5%87%BA%E3%81%95%E3%82%8C%E3%82%8B%E3%81%93%E3%81%A8%E3%80%82%0A        %22%22%22%0A        from pyny import PynyError%0A%0A        with self.assertRaises(PynyError):%0A            api.get_item_count('error')%0A

Add test code #3