Revision 634c90e7
Added by Eric D. Helms over 11 years ago
test/integration/resources/helpers/consumer_helper.rb | ||
---|---|---|
def self.create_consumer(package_profile=false)
|
||
consumer = {}
|
||
destroy_consumer
|
||
VCR.use_cassette('pulp_consumer_helper') do
|
||
VCR.use_cassette('consumer_helper') do
|
||
consumer = @consumer_resource.create(@consumer_id)
|
||
if package_profile
|
||
@consumer_resource.upload_package_profile(@consumer_id, [{"name" => "elephant", "version" => "0.2", "release" => "0.7",
|
||
... | ... | |
end
|
||
|
||
def self.destroy_consumer
|
||
VCR.use_cassette('pulp_consumer_helper') do
|
||
VCR.use_cassette('consumer_helper') do
|
||
@consumer_resource.destroy(@consumer_id)
|
||
end
|
||
rescue Exception => e
|
Also available in: Unified diff
Moves fixtures to be under test/fixtures instead of test/integration.
Removes 'pulp' from the name of all cassettes for consistency.
Fixes some failing tests that are due to inconsistency in to_json of
hashes by adding custom matcher for checking JSON in the body as a
hash comparison.
Adds custom matcher to test against path instead of URI to alleviate
problem with different hostnames for different developers running the
tests.