def test_can_write_allocation_to_file(self, AllocationWriter, os_path):
     self.file_path = AllocationWriter.write_allocation(print_file=True)
     self.assertTrue(os_path.isfile(self.file_path))
 def test_can_write_allocation_to_stdio(self):
     AllocationWriter.write_allocation(print_stdio=True)
     if not hasattr(sys.stdout, "getvalue"):
         self.fail("need to run test in buffered mode")
     output = sys.stdout.getvalue().strip()
     self.assertIn('Room 1 (OFFICE)', output)