Esempio n. 1
0
 def test_approve_closed_stock(self):
     self.query_with_token(self.access_token_master,
                           approve_stock_count.format(**self.approve_data))
     response = self.query_with_token(
         self.access_token_master,
         approve_stock_count.format(**self.approve_data))
     self.assertIn('errors', response)
     self.assertIn(response['errors'][0]['message'],
                   STOCK_ERROR_RESPONSES["stock_count_closed"])
Esempio n. 2
0
 def test_approve_stock_count_with_wrong_batch(self):
     self.approve_data['batchInfo'] = "nanId"
     response = self.query_with_token(
         self.access_token_master,
         approve_stock_count.format(**self.approve_data))
     self.assertEqual(
         STOCK_ERROR_RESPONSES["inexistent_batch_error"].format("nanId"),
         response['errors'][0]['message'])
Esempio n. 3
0
 def test_close_template(self):
     response = self.query_with_token(
         self.access_token_master,
         approve_stock_count.format(**self.approve_data))
     self.assertEqual(
         response['data']['reconcileStock']['stockCount']['stockTemplate']
         ['isClosed'], True)
     self.assertNotIn('errors', response)
Esempio n. 4
0
 def test_approve_stock_count(self):
     response = self.query_with_token(
         self.access_token_master,
         approve_stock_count.format(**self.approve_data))
     self.assertIn('data', response)
     self.assertNotIn('errors', response)