def validate_troupe_data(self, file_name, troupe_name, troupe_data,
                             num_troupes=None):
        dict = ProcessTroupeData.process_troupe_data(file_name)

        self.assertTrue(troupe_name in dict)
        dict_data = dict[troupe_name]

        if num_troupes:
            self.assertEqual(len(dict), num_troupes)

        for k, v in troupe_data:
            try:
                self.assertEqual(dict_data[k], v)
            except KeyError:
                self.assertEqual("no value", v)
    def validate_page_inclusions(self, troupe_data, yes_strings={},
                                 no_strings={}, debug_output=False):
        if not 'name' in troupe_data:
            troupe_data['name'] = "test_name"

        test_page = ProcessTroupeData.create_test_page(troupe_data['name'],
                                                       troupe_data)

        if (debug_output):
            print test_page.encode('utf8')

        {self.assertTrue(test_string in test_page)
            for test_string in yes_strings}

        {self.assertTrue(test_string not in test_page)
            for test_string in no_strings}