Example #1
0
        elif ((('check' and 'if' and 'in') in user_input)
              and (person_name != '') and (movie_name != '')):
            #Check if a {actor} is in {movie}
            if 'movie' in locals():
                p.checker(userName, person_name, movie, movie_name)
            else:
                p.checker(userName, person_name, '', movie_name)
            print('IMDBot: What else can I help you with?')

        elif (('production' and 'company') in user_input
              or sy.findSyns(user_input, 'companies') == 0):
            print(
                "IMDBot: Okay, let me search the production companies for you!"
            )  # buffer for searching companies
            company = c.findCompany(
                movie)  # list the production companies of the movie asked
            print(
                'IMDBot: What else would you like to know about the company? :)'
            )

        elif ('other' in user_input and sy.findSyns(user_input, 'produce')):
            otherMovie = c.findMovieForCompany(userName)
            c.isProduction(company_name, otherMovie)
            print("IMDBot: What else would you like to know?")

        elif (
            (('how' and 'long') in user_input) or
            ('runtime' in user_input or sy.findSyns(user_input, 'length') == 0)
        ):  # Moved to the bottom because it can get called by accident if near top
            if 'movie' in locals():
                movie = f.runtime(movie)
Example #2
0
 def test_findCompany(self):   #FROM COMPANY.py
     result2 = c.findCompany(self.movie)
     self.assertEqual(result2, 'Warner Bros.')