def test_load_bad_file(self) :
        """
            Attempt to load a bad file
        """

        file_name = 'bad_file1.pdf'
        import_parameters = DTPOImportParameters(testing = True)
        import_parameters.database = ImportIntoDTPOTest.test_directory + \
                                     '/' + 'Test Database.dtBase2'
        import_parameters.group = 'Test Group'
        import_parameters.tags = 'Action Required'
        import_parameters.string1 = 'Test String 1'
        import_parameters.string2 = 'Test String 2'
        import_parameters.date_string = '2012-11-10'

        import_parameters.file_type = k.PDF_Document
        import_parameters.mime_type = 'application/pdf'

        import_parameters.source_file = ImportIntoDTPOTest.test_directory + \
                                        "/" + file_name

        self.assertRaises(ParseError, execute_import, import_parameters)
    def test_load_good_file_into_dtpo(self) :
        """
            Loads a good file into a known database
        """

        file_name = 'test_file1.pdf'
        import_parameters = DTPOImportParameters(testing = True)
        import_parameters.database = ImportIntoDTPOTest.test_directory + \
                                     '/' + 'Test Database.dtBase2'
        import_parameters.group = 'Test Group'
        import_parameters.tags = 'Action Required'
        import_parameters.string1 = 'Test String 1'
        import_parameters.string2 = 'Test String 2'
        import_parameters.date_string = '2012-11-10'

        import_parameters.file_type = k.PDF_Document
        import_parameters.mime_type = 'application/pdf'

        import_parameters.source_file = ImportIntoDTPOTest.test_directory + \
                                        "/" + file_name

        self.assertEquals(execute_import(import_parameters), True)