コード例 #1
0
    def test_change_indexerid(self):
        show_obj = TVShow(1, 1, 'en')
        show_obj.name = 'show name'
        show_obj.tvrname = 'show name'
        show_obj.network = 'cbs'
        show_obj.genre = 'crime'
        show_obj.runtime = 40
        show_obj.status = '5'
        show_obj.airs = 'monday'
        show_obj.startyear = 1987

        show_obj.save_to_db()
        show_obj.load_from_db()

        show_obj.prodid = 2
        show_obj.save_to_db()
        show_obj.load_from_db()

        self.assertEqual(show_obj.prodid, 2)
コード例 #2
0
 def test_set_name(self):
     show_obj = TVShow(1, 1, 'en')
     show_obj.name = 'newName'
     show_obj.save_to_db()
     show_obj.load_from_db()
     self.assertEqual(show_obj.name, 'newName')