Exemple #1
0
 def test_load_movies_from_json(self):
     movies = file_impex.load_movies_from_json(folder=os.path.join(
         TESTDATA_PATH, 'trakt'),
                                               filename='exports.json')
     self.assertEqual(1, len(movies))
     self.assertEqual(list, type(movies))
     self.assertEqual(dict, type(movies[0]))
     self.assertEqual('Fight Club', movies[0]['title'])
Exemple #2
0
 def test_load_movies_from_json(self):
     movies = file_impex.load_movies_from_json(folder=os.path.join(
         TESTDATA_PATH, "trakt"),
                                               filename="exports.json")
     self.assertEqual(1, len(movies))
     self.assertEqual(list, type(movies))
     self.assertEqual(dict, type(movies[0]))
     self.assertEqual("Fight Club", movies[0]["title"])
Exemple #3
0
def load_data_from_file(filename):
    movies = file_impex.load_movies_from_json(folder=EXPORTS_FOLDER,
                                              filename=filename)
    sys.stdout.write(
        f"\r\n===== loaded {len(movies)} movies from {EXPORTS_FOLDER}/{filename}\r\n"
    )
    sys.stdout.flush()
    return movies
Exemple #4
0
def load_data_from_file(filename):
    movies = file_impex.load_movies_from_json(folder=EXPORTS_FOLDER, filename=filename)
    sys.stdout.write('\r\n===== loaded {loaded_movies_count} movies from {folder}/{filename}\r\n'.format(
        loaded_movies_count=len(movies),
        folder=EXPORTS_FOLDER,
        filename=filename
    ))
    sys.stdout.flush()
    return movies
Exemple #5
0
def load_data_from_file(filename):
    movies = file_impex.load_movies_from_json(folder=EXPORTS_FOLDER, filename=filename)
    sys.stdout.write('\r\n===== loaded %i movies from %s/%s\r\n' % (len(movies), EXPORTS_FOLDER, filename))
    sys.stdout.flush()
    return movies