Exemple #1
0
    def setUp(self):
        from datetime import datetime, timedelta
        super(RepairTestCase, self).setUp()
        customer = repairs.Customer(emailAddress='*****@*****.**')
        customer.firstName = 'First Name'
        customer.lastName = 'Last Name'
        customer.addressLine1 = 'Address Line 1'
        customer.primaryPhone = '0123456789'
        customer.city = 'Helsinki'
        customer.zipCode = '12345'
        customer.state = 'ZZ'
        customer.country = 'FI'
        self.customer = customer

        d = datetime.now() - timedelta(days=7)
        self.date = d.strftime('%m/%d/%y')
        self.time = d.strftime('%I:%M AM')

        cdata = comptia.fetch()
        gcode = str(self.first_part.componentCode)
        self.symptom = '26094'
        self.issue = 'Apps'
        try:
            self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch()
            self.symptom = self._symptoms[0][0]
            self._issues = repairs.SymptomIssue(
                reportedSymptomCode=self.symptom).fetch()
            self.issue = self._issues[0][0]
        except GsxError as e:
            logging.debug(e)
Exemple #2
0
    def setUp(self):
        from datetime import datetime, timedelta
        super(RepairTestCase, self).setUp()
        customer = repairs.Customer(emailAddress='*****@*****.**')
        customer.firstName = 'First Name'
        customer.lastName = 'Last Name'
        customer.addressLine1 = 'Address Line 1'
        customer.primaryPhone = '0123456789'
        customer.city = 'Helsinki'
        customer.zipCode = '12345'
        customer.state = 'ZZ'
        customer.country = 'FI'
        self.customer = customer

        d = datetime.now() - timedelta(days=7)
        self.date = d.strftime('%m/%d/%y')
        self.time = d.strftime('%I:%M AM')

        cdata = comptia.fetch()
        gcode = str(self.first_part.componentCode)
        self.symptom = '26094'
        self.issue = 'Apps'
        try:
            self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch()
            self.symptom = self._symptoms[0][0]
            self._issues = repairs.SymptomIssue(reportedSymptomCode=self.symptom).fetch()
            self.issue = self._issues[0][0]
        except GsxError as e:
            logging.debug(e)
Exemple #3
0
    def setUp(self):
        from datetime import datetime, timedelta
        super(RepairTestCase, self).setUp()
        customer = repairs.Customer(emailAddress='*****@*****.**')
        customer.firstName = 'First Name'
        customer.lastName = 'Last Name'
        customer.addressLine1 = 'Address Line 1'
        customer.primaryPhone = '0123456789'
        customer.city = 'Helsinki'
        customer.zipCode = '12345'
        customer.state = 'ZZ'
        customer.country = 'FI'
        self.customer = customer

        d = datetime.now() - timedelta(days=7)
        self.date = d.strftime('%m/%d/%y')
        self.time = d.strftime('%I:%M AM')

        cdata = comptia.fetch()
        gcode = str(self.first_part.componentCode)

        _comptia = repairs.CompTiaCode(comptiaGroup=gcode)
        _comptia.comptiaModifier = comptia.MODIFIERS[0][0]
        _comptia.comptiaCode = cdata[gcode][0][0]
        self.comptia = _comptia

        self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch()
        self.symptom = self._symptoms[0][0]
        self._issues = repairs.SymptomIssue(reportedSymptomCode=self.symptom).fetch()
        self.issue = self._issues[0][0]
Exemple #4
0
    def setUp(self):
        from gsxws.core import connect
        connect(os.getenv('GSX_USER'), os.getenv('GSX_SOLDTO'), os.getenv('GSX_ENV'))
        self.sn = os.getenv('GSX_SN')
        device = Product(sn=self.sn)
        comptia_codes = comptia.fetch()

        # pick the first part with a component code
        self.first_part = [x for x in device.parts() if not empty(x.componentCode)][0]

        self.part = repairs.RepairOrderLine()
        self.part.partNumber = os.getenv('GSX_PART', self.first_part.partNumber)
        comptia_code = comptia_codes[self.first_part.componentCode]
        self.part.comptiaCode = comptia_code[0][0]
        self.part.comptiaModifier = 'A'
Exemple #5
0
    def setUp(self):
        super(RemoteDeviceTestCase, self).setUp()
        device = Product(sn=self.sn)
        comptia_codes = comptia.fetch()

        # pick the first part with a component code
        self.first_part = [x for x in device.parts() if not empty(x.componentCode)][0]

        self.part = repairs.RepairOrderLine()
        self.part.partNumber = os.getenv('GSX_PART', self.first_part.partNumber)
        self.comptia_code = comptia_codes.get(
            self.first_part.componentCode,
            ('X01', 'Memory Module (RAM) - Kernel Panic',)
        )
        self.part.comptiaCode = self.comptia_code[0][0]
        self.part.comptiaModifier = 'A'
Exemple #6
0
    def setUp(self):
        super(RemoteDeviceTestCase, self).setUp()
        device = Product(sn=self.sn)
        comptia_codes = comptia.fetch()

        # pick the first part with a component code
        self.first_part = [
            x for x in device.parts() if not empty(x.componentCode)
        ][0]

        self.part = repairs.RepairOrderLine()
        self.part.partNumber = os.getenv('GSX_PART',
                                         self.first_part.partNumber)
        self.comptia_code = comptia_codes.get(self.first_part.componentCode, (
            'X01',
            'Memory Module (RAM) - Kernel Panic',
        ))
        self.part.comptiaCode = self.comptia_code[0][0]
        self.part.comptiaModifier = 'A'
Exemple #7
0
 def test_fetch_comptia(self):
     data = comptia.fetch()
     self.assertIsInstance(data['E'], list)
Exemple #8
0
 def test_fetch_comptia(self):
     data = comptia.fetch()
     self.assertIsInstance(data['E'], list)