import pycomicvine
import unittest

api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"

class TestSearch(unittest.TestCase):
    def test_search_resource_type(self):
        search = pycomicvine.Search(
                resources="volume", 
                query="Angel"
            )
        self.assertIsInstance(search[0], pycomicvine.Volume)

    def test_search_id(self):
        search = pycomicvine.Search(
                query="The Walking Dead",
                field_list=["id"]
            )
        self.assertNotEqual(len(search),0)
        self.assertEqual(search[0].id, 18166)


import pycomicvine
import unittest

api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"

class TestSearch(unittest.TestCase):
    def test_search_resource_type(self):
        search = pycomicvine.Search(
                resources="volume", 
                query="Angel"
            )
        for v in search:
            self.assertIsInstance(v, pycomicvine.Volume)

    def test_search_id(self):
        search = pycomicvine.Search(
                query="The Walking Dead",
                field_list=["id"]
            )
        self.assertNotEqual(len(search),0)
        self.assertEqual(18166, [s.id for s in search])


Check every result in Search test
Check every result in Search test

  import pycomicvine
  import unittest
  
  api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"
  
  class TestSearch(unittest.TestCase):
      def test_search_resource_type(self):
          search = pycomicvine.Search(
                  resources="volume", 
                  query="Angel"
              )
+         for v in search:
-         self.assertIsInstance(search[0], pycomicvine.Volume)
+             self.assertIsInstance(v, pycomicvine.Volume)
  
      def test_search_id(self):
          search = pycomicvine.Search(
                  query="The Walking Dead",
                  field_list=["id"]
              )
          self.assertNotEqual(len(search),0)
-         self.assertEqual(search[0].id, 18166)
+         self.assertEqual(18166, [s.id for s in search])
  
  
Check every result in Search test
## Code Before:
import pycomicvine
import unittest

api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"

class TestSearch(unittest.TestCase):
    def test_search_resource_type(self):
        search = pycomicvine.Search(
                resources="volume", 
                query="Angel"
            )
        self.assertIsInstance(search[0], pycomicvine.Volume)

    def test_search_id(self):
        search = pycomicvine.Search(
                query="The Walking Dead",
                field_list=["id"]
            )
        self.assertNotEqual(len(search),0)
        self.assertEqual(search[0].id, 18166)


## Instruction:
Check every result in Search test
## Code After:
import pycomicvine
import unittest

api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"

class TestSearch(unittest.TestCase):
    def test_search_resource_type(self):
        search = pycomicvine.Search(
                resources="volume", 
                query="Angel"
            )
        for v in search:
            self.assertIsInstance(v, pycomicvine.Volume)

    def test_search_id(self):
        search = pycomicvine.Search(
                query="The Walking Dead",
                field_list=["id"]
            )
        self.assertNotEqual(len(search),0)
        self.assertEqual(18166, [s.id for s in search])

