Example #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)
Example #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.")
Example #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)
Example #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.")
Example #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)
Example #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)
Example #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))
Example #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))
Example #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))
Example #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))
Example #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))