Beispiel #1
0
 def test_movie4(self):
     f = open('test', 'w')
     f.write(str({3: 4, 6: 8}))
     f.close()
     movie3 = netflix_moviecache('test')
     self.assertDictEqual(movie3, {
         1: 2,
         10: 20,
         1: 3.5,
         2: 4.5,
         3: 4,
         6: 8
     })
Beispiel #2
0
 def test_movie5(self):
     f1 = open('test1', 'w')
     f1.write(str({77: 2}))
     f1.close()
     movie4 = netflix_moviecache('test1')
     self.assertDictEqual(movie4, {
         1: 2,
         10: 20,
         1: 3.5,
         2: 4.5,
         3: 4,
         6: 8,
         77: 2
     })
Beispiel #3
0
 def test_movie5 (self) :
     f1 = open('test1','w')
     f1.write(str({77: 2}))  
     f1.close()
     movie4 = netflix_moviecache ('test1') 
     self.assertDictEqual(movie4, {1:2, 10: 20, 1: 3.5, 2: 4.5, 3: 4, 6: 8, 77: 2})
Beispiel #4
0
 def test_movie4 (self) :
     f = open('test', 'w')
     f.write(str({3: 4, 6: 8}))
     f.close()
     movie3 = netflix_moviecache ('test')
     self.assertDictEqual (movie3, {1:2, 10: 20, 1: 3.5, 2: 4.5, 3: 4, 6: 8})
Beispiel #5
0
 def test_movie2 (self) :
     f = open('test', 'w')
     f.write(str({10: 20}))
     f.close()
     movie2 = netflix_moviecache ('test')
     self.assertDictEqual (movie2, {1:2, 10: 20})
Beispiel #6
0
 def test_movie1 (self) :
     f = open('test', 'w')
     f.write(str({1: 2}))
     f.close()
     movie1 = netflix_moviecache ('test')
     self.assertDictEqual (movie1, {1: 2})
Beispiel #7
0
 def test_movie6 (self) :
     netflix_moviecache('/u/prat0318/netflix-tests/savant-cacheMovies.txt')
     self.assert_(len(avgmovie_dict) == 17770)
Beispiel #8
0
 def test_movie2(self):
     f = open('test', 'w')
     f.write(str({10: 20}))
     f.close()
     movie2 = netflix_moviecache('test')
     self.assertDictEqual(movie2, {1: 2, 10: 20})
Beispiel #9
0
 def test_movie1(self):
     f = open('test', 'w')
     f.write(str({1: 2}))
     f.close()
     movie1 = netflix_moviecache('test')
     self.assertDictEqual(movie1, {1: 2})
Beispiel #10
0
 def test_movie6(self):
     netflix_moviecache('/u/prat0318/netflix-tests/savant-cacheMovies.txt')
     self.assert_(len(avgmovie_dict) == 17770)