Пример #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)
Пример #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)

        _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]
Пример #3
0
 def test_issue_code(self):
     self._issues = repairs.SymptomIssue(
         reportedSymptomCode=self.symptom).fetch()
     self.issue = self._issues[0][0]
     self.assertRegex(self.issue, r'[A-Z]+')
Пример #4
0
 def setUp(self):
     super(TestSympomIssueFunctions, self).setUp()
     self._symptoms = repairs.SymptomIssue(serialNumber=self.sn).fetch()
     self.symptom = self._symptoms[0][0]