def test_set_netflix_genres(): create_test_tables() db = MySQLDatabase(schema='qmdb_test', env='test') db.netflix_genres = { 1: { 'genre_names': ['All Action', 'Belgian Movies'], 'movies_updated': arrow.get('2018-02-05 23:01:58+01:00') }, 3: { 'genre_names': ['Japanese Anime'], 'movies_updated': None } } db.set_netflix_genres() db.connect() db.load_netflix_genres() db.close() assert db.netflix_genres == { 1: { 'genre_names': ['All Action', 'Belgian Movies'], 'movies_updated': arrow.get('2018-02-05 23:01:58+01:00') }, 3: { 'genre_names': ['Japanese Anime'], 'movies_updated': None } }
def test_load_netflix_genres(): create_test_tables() db = MySQLDatabase(schema='qmdb_test', env='test') db.connect() db.load_netflix_genres() assert db.netflix_genres == { 1: { 'genre_names': ['All Action', 'All Anime'], 'movies_updated': arrow.get('2018-02-04 23:01:58+01:00') }, 2: { 'genre_names': ['All Anime'], 'movies_updated': None } }