Ejemplo n.º 1
0
 def test_effective_size(self):
     with database.Database(database_override='./tests/database/com.plexapp.plugins.library.db') as db:
         library = Library(db)
         movie = Movie(2, u"a", 'b', 1, 2, 2.2, 'd', 1, 'e', '/test')
         movie.exist = False
         library._update_library(movie)
         self.assertEqual(library.effective_size, self._effective_size)
         movie.exist = True
         movie.matched = True
         library._update_library(movie)
         self.assertEqual(library.effective_size, self._effective_size + 2)
Ejemplo n.º 2
0
 def test_update_library(self):
     with database.Database(database_override='./tests/database/com.plexapp.plugins.library.db') as db:
         library = Library(db)
         movie = Movie(1, u"a", 'b', 1, 2, 2.2, 'd', 1, 'e', '/test')
         library._update_library(movie)
         self.assertEqual(len(library), self._nb_movie + 1)