Repository: nagisc007/storybuilder

Issue:
Need to fix: forget "self" keyword in person's attr
Person内のsub actにおいてselfが抜けていたので修正。
===

**Description**
sub_actでは既に設定した、例えば see などを呼び出して使っているが、それに対してselfがないのでundefinedになる。

**To Reproduce**
nothing

**Expected behavior**
nothing

**Current behavior**
nothing

**Tasks**
- [ ] fix all sub acts in Person class
- [ ] implement sub act test
- [ ] pass tests

**Note**
nothing

Comments:

Patch:
diff --git a/builder/person.py b/builder/person.py
index aae74b0..9a6c312 100644
--- a/builder/person.py
+++ b/builder/person.py
@@ -85,47 +85,47 @@ class Person(BasePerson):
 
     # sub actions
     def agree(self, action, act_word="頷く", with_act=True, with_sub=False):
-        return reply(action, act_word, with_act, with_sub)
+        return self.reply(action, act_word, with_act, with_sub)
 
     def ask(self, action, act_word="尋ねる", with_act=True, with_sub=False):
-        return hear(action, act_word, with_act, with_sub)
+        return self.hear(action, act_word, with_act, with_sub)
 
     def brow(self, action, act_word="眉を顰める", with_act=True, with_sub=False):
-        return feel(action, act_word, with_act, with_sub)
+        return self.feel(action, act_word, with_act, with_sub)
 
     def call(self, action, act_word="呼ぶ", with_act=True, with_sub=False):
-        return speak(action, act_word, with_act, with_sub)
+        return self.speak(action, act_word, with_act, with_sub)
 
     def check(self, action, act_word="確認する", with_act=True, with_sub=False):
-        return hear(action, act_word, with_act, with_sub)
+        return self.hear(action, act_word, with_act, with_sub)
 
     def confuse(self, action, act_word="困惑する", with_act=True, with_sub=False):
-        return feel(action, act_word, with_act, with_sub)
+        return self.feel(action, act_word, with_act, with_sub)
 
     def explain(self, action, act_word="説明する", with_act=True, with_sub=False):
-        return talk(action, act_word, with_act, with_sub)
+        return self.talk(action, act_word, with_act, with_sub)
 
     def gaze(self, action, act_word="見つめる", with_act=True, with_sub=False):
-        return see(action, act_word, with_act, with_sub)
+        return self.see(action, act_word, with_act, with_sub)
 
     def growl(self, action, act_word="唸る", with_act=True, with_sub=False):
-        return speak(action, act_word, with_act, with_sub)
+        return self.speak(action, act_word, with_act, with_sub)
 
     def maon(self, action, act_word="呻く", with_act=True, with_sub=False):
-        return speak(action, act_word, with_act, with_sub)
+        return self.speak(action, act_word, with_act, with_sub)
 
     def oppose(self, action, act_word="反対する", with_act=True, with_sub=False):
-        return reply(action, act_word, with_act, with_sub)
+        return self.reply(action, act_word, with_act, with_sub)
 
     def surprise(self, action, act_word="驚く", with_act=True, with_sub=False):
-        return feel(action, act_word, with_act, with_sub)
+        return self.feel(action, act_word, with_act, with_sub)
 
     def stare(self, action, act_word="睨む", with_act=True, with_sub=False):
-        return see(action, act_word, with_act, with_sub)
+        return self.see(action, act_word, with_act, with_sub)
 
     def take(self, action, act_word="連れて行く", with_act=True, with_sub=False):
-        return go(action, act_word, with_act, with_sub)
+        return self.go(action, act_word, with_act, with_sub)
 
     def visit(self, action, act_word="訪れる", with_act=True, with_sub=False):
-        return go(action, act_word, with_act, with_sub)
+        return self.go(action, act_word, with_act, with_sub)
 


Test patch:
diff --git a/tests/test_base.py b/tests/test_base.py
index be4be77..fe622ea 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -63,6 +63,9 @@ class TitleTest(unittest.TestCase):
 
 class PersonTest(unittest.TestCase):
 
+    def setUp(self):
+        self.psn = Person("Taro", 15, "male", "student", "I am", "he is a man")
+
     def test_attributes(self):
         psn = Person("Taro", 15, "male", "student", "I am", "he is a man")
 
@@ -154,6 +157,14 @@ class PersonTest(unittest.TestCase):
         self.assertEqual(acted.action, "forget his home work")
         self.assertEqual(acted.behavior, Behavior.RESULT)
 
+    def test_sub_act_check(self):
+        acted = self.psn.check("note")
+
+        self.assertTrue(isinstance(acted, Act))
+        self.assertEqual(acted.act_type, ActType.ACT)
+        self.assertEqual(acted.action, "note")
+        self.assertEqual(acted.behavior, Behavior.HEAR)
+
 
 class StageTest(unittest.TestCase):