示例#1
0
文件: tests.py 项目: shobull/hue
  def test_describe_partitioned_table_with_limit(self):
    # We have 2 partitions in the test table
    finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("1")
    try:
      response = self.client.get("/metastore/table/%s/test_partitions/partitions" % self.db_name)
      partition_values_json = json.loads(response.context['partition_values_json'])
      assert_equal(1, len(partition_values_json))
    finally:
      finish()

    finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("3")
    try:
      response = self.client.get("/metastore/table/%s/test_partitions/partitions" % self.db_name)
      partition_values_json = json.loads(response.context['partition_values_json'])
      assert_equal(2, len(partition_values_json))
    finally:
      finish()
示例#2
0
文件: tests.py 项目: Lt-Pone/hue
 def test_browse_partitioned_table_with_limit(self):
   # Limit to 90
   finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90")
   try:
     response = self.client.get("/metastore/table/default/test_partitions")
     assert_true("0x%x" % 89 in response.content, response.content)
     assert_false("0x%x" % 90 in response.content, response.content)
   finally:
     finish()
示例#3
0
 def test_describe_partitioned_table_with_limit(self):
   # Limit to 90
   finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90")
   try:
     response = self.client.get("/metastore/table/%s/test_partitions" % self.db_name)
     assert_true("0x%x" % 89 in response.content, response.content)
     assert_false("0x%x" % 90 in response.content, response.content)
   finally:
     finish()
示例#4
0
文件: tests.py 项目: agibsonccc/hue
 def test_browse_partitions_with_limit(self):
   # Limit to 90
   finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90")
   try:
     response = self.client.get("/catalog/table/default/test_partitions")
     assert_true("0x%x" % 89 in response.content, response.content)
     assert_false("0x%x" % 90 in response.content, response.content)
   finally:
     finish()
示例#5
0
文件: tests.py 项目: neiodavince/hue
  def test_describe_partitioned_table_with_limit(self):
    if is_live_cluster():
      raise SkipTest('HUE-2902: Test is not re-entrant')

    # Limit to 90
    finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90")
    try:
      response = self.client.get("/metastore/table/%s/test_partitions" % self.db_name)
      assert_true("0x%x" % 89 in response.content, response.content)
      assert_false("0x%x" % 90 in response.content, response.content)
    finally:
      finish()
示例#6
0
  def test_describe_partitioned_table_with_limit(self):
    if is_live_cluster():
      raise SkipTest('HUE-2902: Test is not re-entrant')

    # Limit to 90
    finish = BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90")
    try:
      response = self.client.get("/metastore/table/%s/test_partitions" % self.db_name)
      assert_true("0x%x" % 89 in response.content, response.content)
      assert_false("0x%x" % 90 in response.content, response.content)
    finally:
      finish()
示例#7
0
文件: tests.py 项目: erickt/hue
  def test_browse_limit_overrides_partition_limit(self):
    # Limit to 45
    finish = [
        BROWSE_TABLE_LIMIT.set_for_testing("45"),
        BROWSE_PARTITIONED_TABLE_LIMIT.set_for_testing("90"),
    ]

    try:
      response = self.client.get("/metastore/table/default/test_partitions")
      assert_true("0x%x" % 44 in response.content, response.content)
      assert_false("0x%x" % 45 in response.content, response.content)
    finally:
      for f in finish:
        f()