コード例 #1
0
ファイル: test_imports.py プロジェクト: BraindeadCrew/Bookie
 def test_is_delicious_file(self):
     """Verify that this is a delicious file"""
     good_file = self._get_del_file()
     self.assertTrue(
         DelXMLImporter.can_handle(good_file),
         "DelXMLImporter should handle this file")
     good_file.close()
コード例 #2
0
ファイル: test_imports.py プロジェクト: wrestcody/Bookie
    def test_is_not_delicious_file(self):
        """And that it returns false when it should"""
        bad_file = StringIO.StringIO()
        bad_file.write('failing tests please')
        bad_file.seek(0)

        self.assertTrue(not DelXMLImporter.can_handle(bad_file),
                        "DelXMLImporter cannot handle this file")

        bad_file.close()
コード例 #3
0
ファイル: test_imports.py プロジェクト: Cfhansen/Bookie
    def test_is_not_delicious_file(self):
        """And that it returns false when it should"""
        bad_file = StringIO.StringIO()
        bad_file.write('failing tests please')
        bad_file.seek(0)

        ok_(not DelXMLImporter.can_handle(bad_file),
            "DelXMLImporter cannot handle this file")

        bad_file.close()
コード例 #4
0
ファイル: test_imports.py プロジェクト: wrestcody/Bookie
 def test_is_delicious_file(self):
     """Verify that this is a delicious file"""
     good_file = self._get_del_file()
     self.assertTrue(DelXMLImporter.can_handle(good_file),
                     "DelXMLImporter should handle this file")
     good_file.close()