コード例 #1
0
    def verify_actual_data(self, data_label, data_start, data_size, host,
                           *args, **kwargs):
        expected_data = self._get_dataset(data_size)
        client = self.get_client(host, *args, **kwargs)
        actual_data = self._select_data_rows(client, data_label)

        TestRunner.assert_equal(len(expected_data), len(actual_data),
                                "Unexpected number of result rows.")
        for expected_row in expected_data:
            TestRunner.assert_true(
                expected_row in actual_data,
                "Row not found in the result set: %s" % expected_row)
コード例 #2
0
ファイル: sql_helper.py プロジェクト: Hopebaytech/trove
    def verify_actual_data(self, data_label, data_Start, data_size, host,
                           *args, **kwargs):
        expected_data = [(item[self.DATA_COLUMN_NAME],)
                         for item in self._get_dataset(data_size)]
        client = self.get_client(host, *args, **kwargs)
        actual_data = self._select_data_rows(client, self.test_schema,
                                             data_label)

        TestRunner.assert_equal(len(expected_data), len(actual_data),
                                "Unexpected number of result rows.")
        TestRunner.assert_list_elements_equal(
            expected_data, actual_data, "Unexpected rows in the result set.")
コード例 #3
0
ファイル: cassandra_helper.py プロジェクト: Hopebaytech/trove
    def verify_actual_data(self, data_label, data_start, data_size, host,
                           *args, **kwargs):
        expected_data = self._get_dataset(data_size)
        client = self.get_client(host, *args, **kwargs)
        actual_data = self._select_data_rows(client, data_label)

        TestRunner.assert_equal(len(expected_data), len(actual_data),
                                "Unexpected number of result rows.")
        for expected_row in expected_data:
            TestRunner.assert_true(expected_row in actual_data,
                                   "Row not found in the result set: %s"
                                   % expected_row)
コード例 #4
0
ファイル: sql_helper.py プロジェクト: HoratiusTang/trove
    def verify_actual_data(self, data_label, data_Start, data_size, host,
                           *args, **kwargs):
        expected_data = [(item[self.DATA_COLUMN_NAME], )
                         for item in self._get_dataset(data_size)]
        client = self.get_client(host, *args, **kwargs)
        actual_data = self._select_data_rows(client, self.test_schema,
                                             data_label)

        TestRunner.assert_equal(len(expected_data), len(actual_data),
                                "Unexpected number of result rows.")
        TestRunner.assert_list_elements_equal(
            expected_data, actual_data, "Unexpected rows in the result set.")
コード例 #5
0
ファイル: couchdb_helper.py プロジェクト: Hopebaytech/trove
    def verify_actual_data(self, data_label, data_start, data_size, host,
                           *args, **kwargs):
        expected_data = self._get_dataset(data_size)
        client = self.get_client(host, *args, **kwargs)
        db = client[self.database]
        actual_data = []

        TestRunner.assert_equal(len(db), 1)

        for i in db:
            items = db[i].items()
            actual_data = ([value for key, value in items
                           if key not in ['_id', '_rev']])

        TestRunner.assert_equal(len(expected_data),
                                len(actual_data),
                                "Unexpected number of result rows.")

        for expected_row in expected_data:
            TestRunner.assert_true(expected_row in actual_data,
                                   "Row not found in the result set: %s"
                                   % expected_row)
コード例 #6
0
    def verify_actual_data(self, data_label, data_start, data_size, host,
                           *args, **kwargs):
        expected_data = self._get_dataset(data_size)
        client = self.get_client(host, *args, **kwargs)
        db = client[self.database]
        actual_data = []

        TestRunner.assert_equal(len(db), 1)

        for i in db:
            items = db[i].items()
            actual_data = ([
                value for key, value in items if key not in ['_id', '_rev']
            ])

        TestRunner.assert_equal(len(expected_data), len(actual_data),
                                "Unexpected number of result rows.")

        for expected_row in expected_data:
            TestRunner.assert_true(
                expected_row in actual_data,
                "Row not found in the result set: %s" % expected_row)
コード例 #7
0
 def _verify_data_point(self, client, key, expected_value, *args, **kwargs):
     value = self._get_data_point(client, key, *args, **kwargs)
     TestRunner.assert_equal(
         expected_value, value, "Unexpected value '%s' returned from "
         "Couchbase key '%s'" % (value, key))
コード例 #8
0
 def _verify_data_point(self, host, key, expected_value, *args, **kwargs):
     value = self._get_data_point(host, key, *args, **kwargs)
     TestRunner.assert_equal(expected_value, value,
                             "Unexpected value '%s' returned from Redis "
                             "key '%s'" % (value, key))
コード例 #9
0
 def _verify_data_point(self, client, key, expected_value):
     value = client.get(key)
     TestRunner.assert_equal(
         expected_value, value, "Unexpected value '%s' returned from Redis "
         "key '%s'" % (value, key))
コード例 #10
0
ファイル: redis_helper.py プロジェクト: jjmob/trove
 def _verify_data_point(self, client, key, expected_value):
     value = client.get(key)
     TestRunner.assert_equal(expected_value, value,
                             "Unexpected value '%s' returned from Redis "
                             "key '%s'" % (value, key))
コード例 #11
0
 def _verify_data_point(self, client, key, expected_value, *args, **kwargs):
     value = self._get_data_point(client, key, *args, **kwargs)
     TestRunner.assert_equal(expected_value, value,
                             "Unexpected value '%s' returned from "
                             "Couchbase key '%s'" % (value, key))