from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from models import Story


class StoryMethodTests(TestCase):

    def test_ensure_story_is_inserted(self):

        story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic')
        story.save()
        self.assertEquals((story.visits==1), True)
        self.assertEquals((story.name=='Zombies on Campus'), True)
        self.assertEquals((story.description=='Zombies desciption'), True)
        self.assertEquals((story.picture=='testpic'), True)
from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from models import Story, StoryPoint


class StoryMethodTests(TestCase):

    def test_ensure_story_is_inserted(self):

        story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic')
        story.save()
        self.assertEquals((story.visits==1), True)
        self.assertEquals((story.name=='Zombies on Campus'), True)
        self.assertEquals((story.description=='Zombies desciption'), True)
        self.assertEquals((story.picture=='testpic'), True)



    def test_ensure_storyPoints_is_inserted(self):

       storyPoint = StoryPoint(description='You are in the library',choiceText='yes',experience=10,story_type='start',main_story_id_id=5,visits=1,story_point_id=1,picture='testpic2')
       storyPoint.save()
       self.assertEquals((storyPoint.description=='You are in the library'),True)
       self.assertEquals((storyPoint.choiceText=='yes'),True)
       self.assertEquals((storyPoint.experience==10),True)
       self.assertEquals((storyPoint.story_type=='start'),True)
       self.assertEquals((storyPoint.story_point_id==1),True)
       self.assertEquals((storyPoint.picture=='testpic2'),True)
       self.assertEquals((storyPoint.visits==1),True)
       self.assertEquals((storyPoint.main_story_id_id==5),True)

Test case 2 for table storypoint
Test case 2 for table storypoint

  from django.test import TestCase
  
  # Create your tests here.
  
  from django.test import TestCase
- from models import Story
+ from models import Story, StoryPoint
  
  
  class StoryMethodTests(TestCase):
  
      def test_ensure_story_is_inserted(self):
  
          story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic')
          story.save()
          self.assertEquals((story.visits==1), True)
          self.assertEquals((story.name=='Zombies on Campus'), True)
          self.assertEquals((story.description=='Zombies desciption'), True)
-         self.assertEquals((story.picture=='testpic'), True)
+         self.assertEquals((story.picture=='testpic'), True)
+ 
+ 
+ 
+     def test_ensure_storyPoints_is_inserted(self):
+ 
+        storyPoint = StoryPoint(description='You are in the library',choiceText='yes',experience=10,story_type='start',main_story_id_id=5,visits=1,story_point_id=1,picture='testpic2')
+        storyPoint.save()
+        self.assertEquals((storyPoint.description=='You are in the library'),True)
+        self.assertEquals((storyPoint.choiceText=='yes'),True)
+        self.assertEquals((storyPoint.experience==10),True)
+        self.assertEquals((storyPoint.story_type=='start'),True)
+        self.assertEquals((storyPoint.story_point_id==1),True)
+        self.assertEquals((storyPoint.picture=='testpic2'),True)
+        self.assertEquals((storyPoint.visits==1),True)
+        self.assertEquals((storyPoint.main_story_id_id==5),True)
+ 
Test case 2 for table storypoint
## Code Before:
from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from models import Story


class StoryMethodTests(TestCase):

    def test_ensure_story_is_inserted(self):

        story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic')
        story.save()
        self.assertEquals((story.visits==1), True)
        self.assertEquals((story.name=='Zombies on Campus'), True)
        self.assertEquals((story.description=='Zombies desciption'), True)
        self.assertEquals((story.picture=='testpic'), True)
## Instruction:
Test case 2 for table storypoint
## Code After:
from django.test import TestCase

# Create your tests here.

from django.test import TestCase
from models import Story, StoryPoint


class StoryMethodTests(TestCase):

    def test_ensure_story_is_inserted(self):

        story = Story(name="Zombies on Campus",visits=1,description='Zombies desciption',picture='testpic')
        story.save()
        self.assertEquals((story.visits==1), True)
        self.assertEquals((story.name=='Zombies on Campus'), True)
        self.assertEquals((story.description=='Zombies desciption'), True)
        self.assertEquals((story.picture=='testpic'), True)



    def test_ensure_storyPoints_is_inserted(self):

       storyPoint = StoryPoint(description='You are in the library',choiceText='yes',experience=10,story_type='start',main_story_id_id=5,visits=1,story_point_id=1,picture='testpic2')
       storyPoint.save()
       self.assertEquals((storyPoint.description=='You are in the library'),True)
       self.assertEquals((storyPoint.choiceText=='yes'),True)
       self.assertEquals((storyPoint.experience==10),True)
       self.assertEquals((storyPoint.story_type=='start'),True)
       self.assertEquals((storyPoint.story_point_id==1),True)
       self.assertEquals((storyPoint.picture=='testpic2'),True)
       self.assertEquals((storyPoint.visits==1),True)
       self.assertEquals((storyPoint.main_story_id_id==5),True)
