Ejemplo n.º 1
0
 def setUp(self):
     self.endpoint = 'add_scan/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.worker = Worker.objects.get(barcode=111111111111)
     self.barcode = Board.objects.get(id=3)
     self.view = BoardScanAPIView.as_view()
     self.valid_message = {
         "barcode": self.barcode.barcode,
         "worker": self.worker.username,
         "station": Station.objects.get(id=2).name
     }
Ejemplo n.º 2
0
 def setUp(self):
     self.endpoint = 'stock/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = StockDetailAPIView.as_view()
Ejemplo n.º 3
0
 def setUp(self):
     self.endpoint = 'production/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = ProductionDetailAPIView.as_view()
Ejemplo n.º 4
0
 def setUpTestData(cls):
     init_test_db()
     cls.token = get_token()
     cls.permission = BaseAccess()
Ejemplo n.º 5
0
 def setUp(self):
     self.endpoint = 'order_info/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = CompanyOrderInfoAPIView.as_view()
Ejemplo n.º 6
0
 def setUp(self):
     self.endpoint = 'add_sended_board/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = SendedBoardRecordAPIView.as_view()
Ejemplo n.º 7
0
 def setUp(self):
     self.endpoint = 'logout/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = WorkerLogoutAPIView.as_view()
Ejemplo n.º 8
0
 def setUp(self):
     self.endpoint = 'add_worker_scan/'
     init_test_db()
     self.api = TestAPI(token=get_token())
     self.view = WorkerWorkHistoryAPIView.as_view()