Esempio n. 1
0
    def test_is_delicious_file(self):
        """Verify that this is a delicious file"""
        good_file = self._get_del_file()

        ok_(DelImporter.can_handle(good_file),
            "DelImporter should handle this file")

        good_file.close()
Esempio n. 2
0
    def test_is_delicious_file(self):
        """Verify that this is a delicious file"""
        good_file = self._get_del_file()

        self.assertTrue(DelImporter.can_handle(good_file),
                        "DelImporter should handle this file")

        good_file.close()
Esempio n. 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 DelImporter.can_handle(bad_file),
            "DelImporter cannot handle this file")

        bad_file.close()
Esempio n. 4
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 DelImporter.can_handle(bad_file),
                        "DelImporter cannot handle this file")

        bad_file.close()