docstr: Test core reservation class, expecting 2 reservations
docstr_tok: ["Test","core","reservation","class",",","expecting","2","reservations"]
code: def test_reservation_class(self):
      """Test core reservation class, expecting 2 reservations"""
      r = Reservations(2)
      self.assertFalse(r.done())
  
      # add first reservation
      r.add({"node": 1})
      self.assertFalse(r.done())
      self.assertEqual(r.remaining(), 1)
  
      # add second reservation
      r.add({"node": 2})
      self.assertTrue(r.done())
      self.assertEqual(r.remaining(), 0)
  
      # get final list
      reservations = r.get()
      self.assertEqual(len(reservations), 2)
  
file_path: TensorFlowOnSpark/tests/test_reservation.py
imports: import os
  import threading
  import time
  import unittest
  from tensorflowonspark import util
  from tensorflowonspark.reservation import Reservations, Server, Client
  from unittest import mock
label_desc: Use image node_id 1 for calling the ReservationTest obj's underlying member method code with example usage: obj.test_reservation_class() without return types