Пример #1
0
def test_get_movie_titles_correct():
    url = 'https://gist.githubusercontent.com/tiangechen/b68782efa49a16edaf07dc2cdaa855ea/raw/0c794a9717f18b094eabab2cd6a6b9a226903577/movies.csv'
    movie_titles_array = get_movie_titles(url)

    assert isinstance(movie_titles_array, (np.ndarray, list))
Пример #2
0
def test_get_movie_titles_incorrect_list():
    url = [23232, 223]
    movie_titles_array = get_movie_titles(url)
Пример #3
0
def test_get_movie_titles_incorrect_title():
    url = 'jakis film'
    movie_titles_array = get_movie_titles(url)
Пример #4
0
def test_get_movie_titles_incorrect_int():
    url = 23232
    movie_titles_array = get_movie_titles(url)
'''
Create_Report_Files Script
--------------------------

This script allows querying movie titles from a url
and creating a csv file for each movie
'''


from load_save_data import create_seats_array
from meta_data import get_movie_titles

# Setting the cinema hall size
rows = 7
seats = 30

# Creating empty report files
# URL with movie data
url = 'https://gist.githubusercontent.com/tiangechen/b68782efa49a16edaf07dc2cdaa855ea/raw/0c794a9717f18b094eabab2cd6a6b9a226903577/movies.csv'

# Getting an array of movie titles
movie_list = get_movie_titles(url)
if movie_list is not None:
    # Creating an zeros array for each movie
    create_seats_array(movie_list, rows, seats)