Esempio n. 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)
Esempio n. 2
0
    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.")
Esempio n. 3
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)
Esempio n. 4
0
    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.")
Esempio n. 5
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)
Esempio n. 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)
Esempio n. 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))
Esempio n. 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))
Esempio n. 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))
Esempio n. 10
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))
Esempio n. 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))