Esempio n. 1
0
    def setUp(self):
        super().setUp()
        self.synchronizer = sync.TicketSynchronizer()

        fixture_utils.init_statuses()
        fixture_utils.init_resources()
        fixture_utils.init_tickets()
Esempio n. 2
0
 def setUp(self):
     super().setUp()
     self.synchronizer = sync.TicketNoteSynchronizer()
     mocks.init_api_connection(Wrapper)
     fixture_utils.init_resources()
     fixture_utils.init_tickets()
     fixture_utils.init_note_types()
     fixture_utils.init_ticket_notes()
 def setUp(self):
     super().setUp()
     fixture_utils.init_service_call_statuses()
     fixture_utils.init_resources()
     fixture_utils.init_account_types()
     fixture_utils.init_accounts()
     fixture_utils.init_service_calls()
     fixture_utils.init_statuses()
     fixture_utils.init_tickets()
Esempio n. 4
0
    def test_update(self):
        fixture_utils.init_tickets()

        self.assertEqual(Ticket.objects.count(), 1)
        # Change the description of the local record to make our test
        # meaningful.
        t = Ticket.objects.get(id=7688)
        t.description = 'foobar'
        t.save()
        test_instance = fixture_utils.generate_objects(
            'Ticket', fixtures.API_TICKET_LIST)
        _, patch = mocks.create_mock_call(mocks.WRAPPER_QUERY_METHOD,
                                          test_instance)

        self._test_synced(fixtures.API_TICKET)
        patch.stop()
Esempio n. 5
0
    def test_update(self):
        fixture_utils.init_statuses()
        fixture_utils.init_tickets()

        self.assertEqual(Ticket.objects.count(), 1)
        # Change the description of the local record to make our test
        # meaningful.
        t = Ticket.objects.get(id=7688)
        t.description = 'foobar'
        t.save()
        _, patch = mocks.service_api_get_ticket_call(fixtures.API_TICKET_BY_ID)
        _, _checklist_patch = mocks.create_mock_call(
            "djautotask.sync_rest.TicketChecklistItemsSynchronizer.sync_items",
            None)

        self._test_synced(fixtures.API_TICKET_BY_ID['item'])
        patch.stop()
        _checklist_patch.stop()
Esempio n. 6
0
 def setUp(self):
     super().setUp()
     fixture_utils.init_tickets()
Esempio n. 7
0
 def setUp(self):
     super().setUp()
     mocks.init_api_connection(Wrapper)
     fixture_utils.init_resources()
     fixture_utils.init_tickets()
Esempio n. 8
0
 def setUp(self):
     super().setUp()
     fixture_utils.init_resources()
     fixture_utils.init_tickets()
     fixture_utils.init_secondary_resources()