Esempio n. 1
0
    def setUpClass(cls):
        cls.cfg = config.Config()
        cls.header = helpers.create_marconi_headers()

        cls.headers_response_empty = set(['location'])
        cls.headers_response_with_body = set(['content-location',
                                              'content-type'])
Esempio n. 2
0
    def setUpClass(cls):
        cls.cfg = config.Config()
        cls.header = helpers.create_marconi_headers()

        cls.headers_response_empty = set(['location'])
        cls.headers_response_with_body = set(['content-location',
                                              'content-type'])

        cls.queue_url = cls.cfg.base_url + '/queues/{}'.format(uuid.uuid1())
        http.put(cls.queue_url, cls.header)

        url = cls.queue_url + '/metadata'
        metadata = {"queue_metadata": "TEST METADATA"}
        http.put(url, cls.header, json.dumps(metadata))
Esempio n. 3
0
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from marconi.tests.functional.util import config
from marconi.tests.functional.util import http

import json
import random
import string

CFG = config.Config()


def get_keystone_token():
    """Gets Keystone Auth token."""
    req_json = {
        'auth': {
            'passwordCredentials': {
                'username': CFG.username,
                'password': CFG.password
            },
        },
    }

    header = {"Content-Type": "application/json", "Accept": "application/json"}
    url = CFG.auth_url
Esempio n. 4
0
    def setUpClass(cls):
        """Create Queue, Post Messages for Claim Tests."""
        cls.cfg = config.Config()
        cls.header = helpers.create_marconi_headers()

        cls.headers_response_with_body = set(['location', 'content-type'])