class_docstr: Checks all functions of BlitzDBDALDriver
code: def test_query_sort_bool(self):
      collection = "snapshot"
      self.database.set(
          collection, {"range_query6": 1, "current": True}
      )
      self.database.set(
          collection, {"range_query6": 2, "current": False}
      )
      self.database.set(
          collection, {"range_query6": 3, "current": True}
      )
      self.database.set(
          collection, {"range_query6": 4, "current": True}
      )
  
      # ascending
      items = self.database.query(
          collection,
          {"range_query6": {"$gte": 2}},
          sort_key="current",
          sort_order="ascending",
      )
      assert items[0]["range_query6"] == 2
      assert items[0]["current"] == False
  
      # descending
      items = self.database.query(
          collection,
          {"range_query6": {"$gte": 2}},
          sort_key="current",
          sort_order="descending",
      )
      assert items[0]["range_query6"] == 3
      assert items[0]["current"] == True
  
      # sort_key passed in but sort_order missing
      failed = False
      try:
          _ = self.database.query(
              collection,
              {"range_query6": {"$gte": 2}},
              sort_key="current",
          )
      except RequiredArgumentMissing:
          failed = True
      assert failed
  
      # sort_order passed in but sort_key missing
      failed = False
      try:
          _ = self.database.query(
              collection,
              {"range_query6": {"$gte": 2}},
              sort_order="descending",
          )
      except RequiredArgumentMissing:
          failed = True
      assert failed
  
      # wrong order being passed in
      failed = False
      try:
          _ = self.database.query(
              collection,
              {"range_query6": {"$gte": 2}},
              sort_key="range_query6",
              sort_order="wrong_order",
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # wrong key and order being passed in
      failed = False
      try:
          _ = self.database.query(
              collection,
              {"range_query6": {"$gte": 2}},
              sort_key="wrong_key",
              sort_order="wrong_order",
          )
      except InvalidArgumentType:
          failed = True
      assert failed
  
      # wrong key and right order being passed in
      expected_items = self.database.query(
          collection, {"range_query6": {"$gte": 2}}
      )
      items = self.database.query(
          collection,
          {"range_query6": {"$gte": 2}},
          sort_key="wrong_key",
          sort_order="ascending",
      )
      expected_ids = [item["id"] for item in expected_items]
      ids = [item["id"] for item in items]
      assert set(expected_ids) == set(ids)
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import tempfile
  import datetime
  import platform
  from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver
  from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, RequiredArgumentMissing
  from datmo.core.util.misc_functions import create_unique_hash
label_desc: Use image node_id 24 for calling the TestBlitzDBDALDriver obj's underlying member method code with example usage: obj.test_query_sort_bool() without return types