Example #1
0
 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()
Example #2
0
    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()
Example #3
0
    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()
Example #4
0
 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()