Exemplo n.º 1
0
    def test_is_google_file(self):
        """Verify that this is a delicious file"""
        good_file = self._get_google_file()

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

        good_file.close()
Exemplo n.º 2
0
    def test_is_google_file(self):
        """Verify that this is a delicious file"""
        good_file = self._get_file()

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

        good_file.close()
Exemplo n.º 3
0
    def test_is_not_google_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 GBookmarkImporter.can_handle(bad_file),
                        "GBookmarkImporter cannot handle this file")

        bad_file.close()
Exemplo n.º 4
0
    def test_is_not_google_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 GBookmarkImporter.can_handle(bad_file),
            "GBookmarkImporter cannot handle this file")

        bad_file.close()