コード例 #1
0
ファイル: tests.py プロジェクト: priestd09/reviewboard
    def setUp(self):
        """Set up this test case."""
        super(SandboxTests, self).setUp()

        register_mimetype_handler(SandboxMimetypeHandler)

        user = User.objects.create(username="******", password="******", email="")

        review_request = self.create_review_request(submitter=user)
        self.file_attachment = self.create_file_attachment(review_request=review_request)
コード例 #2
0
ファイル: __init__.py プロジェクト: znick/reviewboard
def _register_mimetype_handlers(**kwargs):
    """Registers all bundled Mimetype Handlers."""
    from reviewboard.attachments.mimetypes import (
        ImageMimetype, MarkDownMimetype, MimetypeHandler,
        register_mimetype_handler, ReStructuredTextMimetype, TextMimetype)

    register_mimetype_handler(ImageMimetype)
    register_mimetype_handler(MarkDownMimetype)
    register_mimetype_handler(MimetypeHandler)
    register_mimetype_handler(ReStructuredTextMimetype)
    register_mimetype_handler(TextMimetype)
コード例 #3
0
ファイル: tests.py プロジェクト: iapilgrim/reviewboard
    def setUp(self):
        super(SandboxTests, self).setUp()

        register_mimetype_handler(SandboxMimetypeHandler)

        user = User.objects.create(username='******',
                                   password='******', email='')

        review_request = self.create_review_request(submitter=user)
        self.file_attachment = self.create_file_attachment(
            review_request=review_request)
コード例 #4
0
ファイル: tests.py プロジェクト: halvorlu/reviewboard
    def setUp(self):
        super(SandboxTests, self).setUp()

        register_mimetype_handler(SandboxMimetypeHandler)

        user = User.objects.create(username='******',
                                   password='******',
                                   email='')

        review_request = self.create_review_request(submitter=user)
        self.file_attachment = self.create_file_attachment(
            review_request=review_request)
コード例 #5
0
def _register_mimetype_handlers(**kwargs):
    """Register all bundled Mimetype Handlers."""
    from reviewboard.attachments.mimetypes import (ImageMimetype,
                                                   MarkDownMimetype,
                                                   MimetypeHandler,
                                                   register_mimetype_handler,
                                                   ReStructuredTextMimetype,
                                                   TextMimetype)

    register_mimetype_handler(ImageMimetype)
    register_mimetype_handler(MarkDownMimetype)
    register_mimetype_handler(MimetypeHandler)
    register_mimetype_handler(ReStructuredTextMimetype)
    register_mimetype_handler(TextMimetype)
コード例 #6
0
    def __init__(self, extension, mimetype_handlers):
        super(FileAttachmentThumbnailHook, self).__init__(extension)
        self.mimetype_handlers = mimetype_handlers

        for mimetype_handler in self.mimetype_handlers:
            register_mimetype_handler(mimetype_handler)
コード例 #7
0
ファイル: tests.py プロジェクト: priestd09/reviewboard
    def setUp(self):
        """Set up this test case."""
        super(MimetypeHandlerTests, self).setUp()

        # Register test cases in same order as they are defined
        # in this test
        register_mimetype_handler(MimetypeTest)
        register_mimetype_handler(TestAbcMimetype)
        register_mimetype_handler(TestXmlMimetype)
        register_mimetype_handler(Test2AbcXmlMimetype)
        register_mimetype_handler(StarDefMimetype)
        register_mimetype_handler(StarAbcDefMimetype)
        register_mimetype_handler(Test3XmlMimetype)
        register_mimetype_handler(Test3AbcXmlMimetype)
        register_mimetype_handler(Test3StarMimetype)
コード例 #8
0
    def setUp(self):
        """Set up this test case."""
        super(MimetypeHandlerTests, self).setUp()

        # Register test cases in same order as they are defined
        # in this test
        register_mimetype_handler(MimetypeTest)
        register_mimetype_handler(TestAbcMimetype)
        register_mimetype_handler(TestXmlMimetype)
        register_mimetype_handler(Test2AbcXmlMimetype)
        register_mimetype_handler(StarDefMimetype)
        register_mimetype_handler(StarAbcDefMimetype)
        register_mimetype_handler(Test3XmlMimetype)
        register_mimetype_handler(Test3AbcXmlMimetype)
        register_mimetype_handler(Test3StarMimetype)
コード例 #9
0
ファイル: hooks.py プロジェクト: iosphere/reviewboard
    def __init__(self, extension, mimetype_handlers):
        super(FileAttachmentThumbnailHook, self).__init__(extension)
        self.mimetype_handlers = mimetype_handlers

        for mimetype_handler in self.mimetype_handlers:
            register_mimetype_handler(mimetype_handler)
コード例 #10
0
 def setUp(self):
     # Register test cases in same order as they are defined
     # in this test
     register_mimetype_handler(MimetypeTest)
     register_mimetype_handler(TestAbcMimetype)
     register_mimetype_handler(TestXmlMimetype)
     register_mimetype_handler(Test2AbcXmlMimetype)
     register_mimetype_handler(StarDefMimetype)
     register_mimetype_handler(StarAbcDefMimetype)
     register_mimetype_handler(Test3XmlMimetype)
     register_mimetype_handler(Test3AbcXmlMimetype)
     register_mimetype_handler(Test3StarMimetype)
コード例 #11
0
ファイル: tests.py プロジェクト: CrystalLokKoo/reviewboard
 def setUp(self):
     # Register test cases in same order as they are defined
     # in this test
     register_mimetype_handler(MimetypeTest)
     register_mimetype_handler(TestAbcMimetype)
     register_mimetype_handler(TestXmlMimetype)
     register_mimetype_handler(Test2AbcXmlMimetype)
     register_mimetype_handler(StarDefMimetype)
     register_mimetype_handler(StarAbcDefMimetype)
     register_mimetype_handler(Test3XmlMimetype)
     register_mimetype_handler(Test3AbcXmlMimetype)
     register_mimetype_handler(Test3StarMimetype)
コード例 #12
0
 def initialize(self):
     ReviewUIHook(self, [PDFReviewUI])
     register_mimetype_handler(PDFMimetype)
コード例 #13
0
ファイル: __init__.py プロジェクト: aam1r/reviewboard
def _register_mimetype_handlers(**kwargs):
    """Registers all bundled Mimetype Handlers."""
    from reviewboard.attachments.mimetypes import ImageMimetype, \
                                                  MarkDownMimetype, \
                                                  MimetypeHandler, \
                                                  register_mimetype_handler, \
                                                  ReStructuredTextMimetype, \
                                                  TextMimetype, \
                                                  XMLMimetype


    register_mimetype_handler(ImageMimetype)
    register_mimetype_handler(MarkDownMimetype)
    register_mimetype_handler(MimetypeHandler)
    register_mimetype_handler(ReStructuredTextMimetype)
    register_mimetype_handler(TextMimetype)
    register_mimetype_handler(XMLMimetype)