예제 #1
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        super(UploadSeleniumTestCase, self).setUp()
예제 #2
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        edid_binary = "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x52\x62\x06\x02\x01" \
                      "\x01\x01\x01\xFF\x13\x01\x03\x80\x59\x32\x78\x0A\xF0" \
                      "\x9D\xA3\x55\x49\x9B\x26\x0F\x47\x4A\x21\x08\x00\x81" \
                      "\x80\x8B\xC0\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01" \
                      "\x01\x01\x02\x3A\x80\x18\x71\x38\x2D\x40\x58\x2C\x45" \
                      "\x00\x76\xF2\x31\x00\x00\x1E\x66\x21\x50\xB0\x51\x00" \
                      "\x1B\x30\x40\x70\x36\x00\x76\xF2\x31\x00\x00\x1E\x00" \
                      "\x00\x00\xFC\x00\x54\x4F\x53\x48\x49\x42\x41\x2D\x54" \
                      "\x56\x0A\x20\x20\x00\x00\x00\xFD\x00\x17\x3D\x0F\x44" \
                      "\x0F\x00\x0A\x20\x20\x20\x20\x20\x20\x01\x24"

        # Parse EDID file
        edid_data = EDIDParser(edid_binary).data
        # Encode in base64
        edid_base64 = base64.b64encode(edid_binary)

        # Create EDID entry
        edid_object = EDID.create(file_base64=edid_base64, edid_data=edid_data)
        edid_object.save()
        edid_object.populate_timings_from_parser(edid_data)
        edid_object.save()

        self.edid = edid_object

        super(EDIDReadySeleniumTestCase, self).setUp()
예제 #3
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        edid_binary = b'\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x52\x62\x06\x02\x01' \
                      b'\x01\x01\x01\xFF\x13\x01\x03\x80\x59\x32\x78\x0A\xF0' \
                      b'\x9D\xA3\x55\x49\x9B\x26\x0F\x47\x4A\x21\x08\x00\x81' \
                      b'\x80\x8B\xC0\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' \
                      b'\x01\x01\x02\x3A\x80\x18\x71\x38\x2D\x40\x58\x2C\x45' \
                      b'\x00\x76\xF2\x31\x00\x00\x1E\x66\x21\x50\xB0\x51\x00' \
                      b'\x1B\x30\x40\x70\x36\x00\x76\xF2\x31\x00\x00\x1E\x00' \
                      b'\x00\x00\xFC\x00\x54\x4F\x53\x48\x49\x42\x41\x2D\x54' \
                      b'\x56\x0A\x20\x20\x00\x00\x00\xFD\x00\x17\x3D\x0F\x44' \
                      b'\x0F\x00\x0A\x20\x20\x20\x20\x20\x20\x01\x24'
        edid_file = self._create_temp_file(edid_binary)

        # Upload the file and check for redirection to EDID detail view
        response = self.client.post(reverse('edid-upload-binary'), {
            'name': 'edid.bin',
            'edid_file': edid_file
        })
        self.assertRedirects(response, reverse('edid-detail', kwargs={'pk':
                                                                      1}))

        edid_file.close()
예제 #4
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='SEC', name='Seiko Epson Corporation'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        self.post_url = reverse('api-upload-text')
예제 #5
0
    def setUp(self):
        with transaction.commit_on_success():
            Manufacturer.objects.bulk_create([
                Manufacturer(name_id='TSB', name='Toshiba'),
                Manufacturer(name_id='UNK', name='Unknown'),
            ])

        super(UploadSeleniumTestCase, self).setUp()
예제 #6
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        self.post_url = reverse('api-upload')
        self.valid_base64_1 = 'AP///////wBSYgYCAQEBAf8TAQOAWTJ4CvCdo1VJmyYPR' \
                              '0ohCACBgIvAAQEBAQEBAQEBAQEBAjqAGHE4LUBYLEUAdv' \
                              'IxAAAeZiFQsFEAGzBAcDYAdvIxAAAeAAAA/ABUT1NISUJ' \
                              'BLVRWCiAgAAAA/QAXPQ9EDwAKICAgICAgASQ='
        self.valid_base64_2 = 'AP///////wAEcqGt3vdQgyMSAQMILx546t6Vo1RMmSYPU' \
                              'FS/75CpQHFPgUCLwJUAlQ+QQAEBITmQMGIaJ0BosDYA2i' \
                              'gRAAAZAAAA/QA4TR9UEQAKICAgICAgAAAA/wBMQTEwQzA' \
                              '0MTQwMzAKAAAA/ABBTDIyMTZXCiAgICAgAFI='
예제 #7
0
    def setUp(self):
        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        self.edid_binary = "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00\x52\x62\x06\x02" \
                           "\x01\x01\x01\x01\xFF\x13\x01\x03\x80\x59\x32\x78" \
                           "\x0A\xF0\x9D\xA3\x55\x49\x9B\x26\x0F\x47\x4A\x21" \
                           "\x08\x00\x81\x80\x8B\xC0\x01\x01\x01\x01\x01\x01" \
                           "\x01\x01\x01\x01\x01\x01\x02\x3A\x80\x18\x71\x38" \
                           "\x2D\x40\x58\x2C\x45\x00\x76\xF2\x31\x00\x00\x1E" \
                           "\x66\x21\x50\xB0\x51\x00\x1B\x30\x40\x70\x36\x00" \
                           "\x76\xF2\x31\x00\x00\x1E\x00\x00\x00\xFC\x00\x54" \
                           "\x4F\x53\x48\x49\x42\x41\x2D\x54\x56\x0A\x20\x20" \
                           "\x00\x00\x00\xFD\x00\x17\x3D\x0F\x44\x0F\x00\x0A" \
                           "\x20\x20\x20\x20\x20\x20\x01\x24"
예제 #8
0
    def setUp(self):
        super(EDIDTestMixin, self).setUp()

        Manufacturer.objects.bulk_create([
            Manufacturer(name_id='TSB', name='Toshiba'),
            Manufacturer(name_id='UNK', name='Unknown'),
        ])

        # Parse EDID file
        edid_data = EDIDParser(self._edid_binary).data
        # Encode in base64
        edid_base64 = base64.b64encode(self._edid_binary)

        # Create EDID entry
        edid_object = EDID.create(file_base64=edid_base64, edid_data=edid_data)
        edid_object.save()
        edid_object.populate_timings_from_parser(edid_data)
        edid_object.save()

        self.edid = edid_object
예제 #9
0
 def setUp(self):
     Manufacturer.objects.bulk_create([
         Manufacturer(name_id='TSB', name='Toshiba'),
         Manufacturer(name_id='UNK', name='Unknown'),
     ])