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 })
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 })
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})
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})
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})
def test_movie1 (self) : f = open('test', 'w') f.write(str({1: 2})) f.close() movie1 = netflix_moviecache ('test') self.assertDictEqual (movie1, {1: 2})
def test_movie6 (self) : netflix_moviecache('/u/prat0318/netflix-tests/savant-cacheMovies.txt') self.assert_(len(avgmovie_dict) == 17770)
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})
def test_movie1(self): f = open('test', 'w') f.write(str({1: 2})) f.close() movie1 = netflix_moviecache('test') self.assertDictEqual(movie1, {1: 2})
def test_movie6(self): netflix_moviecache('/u/prat0318/netflix-tests/savant-cacheMovies.txt') self.assert_(len(avgmovie_dict) == 17770)