tests.test_entities

Tests for nailgun.entities.

class tests.test_entities.ConfigTemplateTestCase(methodName='runTest')

Tests for nailgun.entities.ConfigTemplate.

test_creation_and_update()

Check template combinations as json or entity is set on correct attribute template_combinations_attributes ( check #333)

class tests.test_entities.ContentUploadTestCase(methodName='runTest')

Tests for nailgun.entities.ContentUpload.

setUp()

Set self.repo.

test_content_upload_create()

Test nailgun.entities.ContentUpload.create.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_content_upload_delete()

Test nailgun.entities.ContentUpload.delete.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_content_upload_no_filename()

Test nailgun.entities.ContentUpload.upload without a filename.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_content_upload_update()

Test nailgun.entities.ContentUpload.update.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_content_upload_upload()

Test nailgun.entities.ContentUpload.upload.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

class tests.test_entities.ContentViewComponentTestCase(methodName='runTest')

Tests for nailgun.entities.ContentViewComponent.

setUp()

Set a server configuration at self.cfg.

test_add()

Check that helper method is sane.

Assert that:

  • Method has a correct signature.
  • Method calls client.* once.
  • Method calls entities._handle_response once.
test_remove()

Check that helper method is sane.

Assert that:

  • Method has a correct signature.
  • Method calls client.* once.
  • Method calls entities._handle_response once.
class tests.test_entities.ContentViewTestCase(methodName='runTest')

Tests for nailgun.entities.ContentView.

setUp()

Hook method for setting up the test fixture before exercising it.

test_read()

Check that helper method is sane.

Check that helper method is sane.

class tests.test_entities.CreateMissingTestCase(methodName='runTest')

Tests for extensions of create_missing.

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_auth_source_ldap_v1()

Test AuthSourceLDAP(onthefly_register=False).create_missing()

test_auth_source_ldap_v2()

Test AuthSourceLDAP(onthefly_register=True).create_missing().

test_auth_source_ldap_v3()

Does AuthSourceLDAP.create_missing overwrite fields?

test_config_template_v1()

Test ConfigTemplate(snippet=True).

test_config_template_v2()

Test ConfigTemplate(snippet=False).

test_config_template_v3()

Test ConfigTemplate(snippet=False, template_kind=…).

test_domain_v1()

Test Domain(name='UPPER').

test_domain_v2()

Test Domain().

test_external_usergroup()

Test ExternalUserGroup()

test_host_v1()

Test Host().

test_host_v2()

Test Host() with providing all the optional entities unlinked

test_host_v3()

Test Host() providing optional entities with id only. Check that additional read was called for that entities.

test_lifecycle_environment_v1()

Test LifecycleEnvironment(name='Library').

test_lifecycle_environment_v2()

Test LifecycleEnvironment(name='not Library').

test_lifecycle_environment_v3()

What happens when the “Library” lifecycle env cannot be found?

test_provisioning_template_v1()

Test ProvisioningTemplate(snippet=True).

test_provisioning_template_v2()

Test ProvisioningTemplate(snippet=False).

test_provisioning_template_v3()

Test ProvisioningTemplate(snippet=False, template_kind=…).

test_report_template_v1()

Test ReportTemplate(name='testName').

test_report_template_v2()

Test ReportTemplate().

test_report_template_v3()

Test ReportTemplate(default=True).

test_report_template_v4()

Test ReportTemplate(default=False).

test_repository_v1()

Test Repository(content_type='docker').

test_repository_v2()

Test Repository(content_type='not docker').

class tests.test_entities.CreatePayloadTestCase(methodName='runTest')

Tests for extensions of create_payload.

Several classes extend the create_payload method and make it do things like rename attributes or wrap the submitted dict of data in a second hash. It is possible to mess this up in a variety of ways. For example, an extended method could try to rename an attribute that does not exist. This class attempts to find such issues by creating an entity, calling nailgun.entity_mixins.EntityCreateMixin.create_payload() and asserting that a dict is returned.

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_content_view_filter_rule()

Create a nailgun.entities.ContentViewFilterRule.

test_discovery_rule()

Create a nailgun.entities.DiscoveryRule.

test_external_usergroup_payload()

Call create_payload on a nailgun.entities.ExternalUserGroup.

test_host_collection()

Create a nailgun.entities.HostCollection.

test_image()

Create a nailgun.entities.Image.

test_job_template()

Create a nailgun.entities.JobTemplate.

test_media()

Create a nailgun.entities.Media.

test_no_attributes()

Instantiate an entity and call create_payload on it.

test_override_value()

Create a nailgun.entities.OverrideValue.

test_subnet()

Create a nailgun.entities.Subnet.

test_sync_plan()

Call create_payload on a nailgun.entities.SyncPlan.

class tests.test_entities.CreateTestCase(methodName='runTest')

Tests for nailgun.entity_mixins.EntityCreateMixin.create().

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_generic()

Call create on a variety of entities.

class tests.test_entities.FileTestCase(methodName='runTest')

Class with entity File tests

test_to_json()

Check json serialisation on nested entities

class tests.test_entities.ForemanStatusTestCase(methodName='runTest')

Tests for nailgun.entities.ForemanStatus.

setUp()

Set a server configuration at self.cfg.

test_read()

Ensure read and read_json are called once.

class tests.test_entities.ForemanTaskTestCase(methodName='runTest')

Tests for nailgun.entities.ForemanTask.

setUp()

Set self.foreman_task.

test_poll()

Call nailgun.entities.ForemanTask.poll().

class tests.test_entities.GenericTestCase(methodName='runTest')

Generic tests for the helper methods on entities.

classmethod setUpClass()

Create test data as cls.methods_requests.

methods_requests is a tuple of two-tuples, like so:

(
    entity_obj1.method, 'post',
    entity_obj2.method, 'post',
    entity_obj3.method1, 'get',
    entity_obj3.method2, 'put',
)
test_generic()

Check that a variety of helper methods are sane.

Assert that:

  • Each method has a correct signature.
  • Each method calls client.* once.
  • Each method passes the right arguments to client.*.
  • Each method calls entities._handle_response once.
  • The result of _handle_response(…) is the return value.
test_intelligent()

Check that intelligent methods that send additional data are sane.

Assert that:

  • Each method calls client.* once.
  • Each method passes the right arguments to client.*.
  • Each method calls entities._handle_response once.
  • The result of _handle_response(…) is the return value.
class tests.test_entities.GetOrgTestCase(methodName='runTest')

Test nailgun.entities._get_org.

setUp()

Set self.args, which can be passed to _get_org.

test_api_response_error()

Trigger an nailgun.entities.APIResponseError.

test_default()

Run the method with a sane and normal set of arguments.

test_to_json()

json serialization

class tests.test_entities.HandleResponseTestCase(methodName='runTest')

Test nailgun.entities._handle_response.

test_accepted_v1()

Give the response an HTTP “ACCEPTED” status code.

Call _handle_response twice:

  • Do not pass the synchronous argument.
  • Pass synchronous=False.
test_accepted_v2()

Give the response an HTTP “ACCEPTED” status code.

Pass synchronous=True as an argument.

test_default()

Don’t give the response any special status code.

test_json_content()

Give the response JSON content type

test_no_content()

Give the response an HTTP “NO CONTENT” status code.

test_no_json_content()

Check if no JSON content type response return response.content.

class tests.test_entities.HostGroupTestCase(methodName='runTest')

Tests for nailgun.entities.HostGroup.

setUp()

Hook method for setting up the test fixture before exercising it.

test_clone_hostgroup()

“Test for nailgun.entities.HostGroup.clone() Assert that the method is called one with correct argumets

test_delete_puppetclass()

Check that helper method is sane.

Assert that:

  • Method has a correct signature.
  • Method calls client.* once.
  • Method passes the right arguments to client.* and special
    argument ‘puppetclass_id’ removed from data dict.
  • Method calls entities._handle_response once.
  • The result of _handle_response(…) is the return value.
test_read_sat61z()

Ensure read, read_json and update_json are called once.

This test is only appropriate for entities that override the read method in order to fiddle with the attrs argument.

test_read_sat62z()

Ensure read and read_json are called once. And update_json are not called.

This test is only appropriate for entities that override the read method in order to fiddle with the attrs argument.

test_rebuild_config()

“Test for nailgun.entities.HostGroup.rebuild_config() Assert that the method is called one with correct arguments

class tests.test_entities.HostTestCase(methodName='runTest')

Tests for nailgun.entities.Host.

setUp()

Set a server configuration at self.cfg.

test_delete_puppetclass()

Check that helper method is sane.

Assert that:

  • Method has a correct signature.
  • Method calls client.* once.
  • Method passes the right arguments to client.* and special
    argument ‘puppetclass_id’ removed from data dict.
  • Method calls entities._handle_response once.
  • The result of _handle_response(…) is the return value.
test_disassociate()

Disassociate host

test_init_with_owner()

Assert that both id or entity can be passed as a value for owner attribute.

test_init_with_owner_type()

Assert owner attribute is an entity of correct type, according to owner_type field value

test_no_facet_attributes()

Assert that content_facet_attributes attribute is ignored when content_facet_attributes attribute is not returned for host

test_owner_type_property()

Verify owner_type property works as expected.

Assert that:

  • owner_type property reflects _owner_type attribute value
  • owner_type property is included in attributes list, _owner_type attribute - is not
test_update_owner_type()

Ensure that in case owner_type value changes, owner changes it’s type accordingly.

class tests.test_entities.InitTestCase(methodName='runTest')

Tests for all of the __init__ methods.

The tests in this class are a sanity check. They simply check to see if you can instantiate each entity.

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_init_succeeds()

Instantiate every entity.

Assert that the returned object is an instance of the class that produced it.

test_required_params()

Instantiate entities that require extra parameters.

Assert that TypeError is raised if the required extra parameters are not provided.

class tests.test_entities.JobInvocationTestCase(methodName='runTest')

Tests for nailgun.entities.JobInvocation.

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

test_non_sync_run()

Run job asynchronously with valid parameters and check that correct post request is sent

test_required_param()

Check required parameters

test_sync_run()

Check that sync run will result in ForemanTask poll

class tests.test_entities.JobTemplateTestCase(methodName='runTest')

Tests for nailgun.entities.JobTemplate.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

class tests.test_entities.JsonSerializableTestCase(methodName='runTest')

Test regarding Json serializable on different object

test_boolean_datetime_float()

Check serialization for boolean, datetime and float fields

test_date_field()

Check date field serialization

test_entities()

Testing nested entities serialization

test_nested_entities()

Check nested entities serialization

test_regular_objects()

Checking regular objects transformation

class tests.test_entities.ModuleStreamTestCase(methodName='runTest')

Class with entity Module Stream tests

test_to_json()

Check json serialisation on nested entities

class tests.test_entities.PackageGroupTestCase(methodName='runTest')

Class with entity Package Group tests

test_to_json()

Check json serialisation on nested entities

class tests.test_entities.PackageTestCase(methodName='runTest')

Class with entity Package tests

test_to_json()

Check json serialisation on nested entities

class tests.test_entities.PathTestCase(methodName='runTest')

Tests for extensions of nailgun.entity_mixins.Entity.path().

setUp()

Set self.cfg and self.id_.

test_arfreport()

Test nailgun.entities.ArfReport.path(). Assert that the following return appropriate paths: * ArfReport(id=…).path() * ArfReport(id=…).path('download_html')

test_capsule()

Test nailgun.entities.Capsule.path().

Assert that the following return appropriate paths:

  • Capsule().path('content_lifecycle_environments')
  • Capsule().path('content_sync')
test_externalusergroup()

Test nailgun.entities.ExternalUserGroup.path().

Assert that the following return appropriate paths:

  • ExternalUserGroup(id=…,usergroup=…).path()
  • ExternalUserGroup(id=…,usergroup=…).path('refresh')
test_hostsubscription()

Test nailgun.entities.HostSubscription.path().

Assert that the following return appropriate paths:

  • HostSubscription(host=…).path('add_subscriptions')
  • HostSubscription(host=…).path('remove_subscriptions')
test_id_and_which()

Execute entity(id=…).path(which=…).

test_no_such_path_error()

Trigger nailgun.entity_mixins.NoSuchPathError exceptions.

Do this by calling entity().path(which=…).

test_noid_and_which()

Execute entity().path(which=…).

test_nowhich()

Execute entity().path() and entity(id=…).path().

test_os_default_template()

Test nailgun.entities.OSDefaultTemplate.path

Assert that the following return appropriate paths:

  • OSDefaultTemplate(id=…).path()
test_repository_set()

Test nailgun.entities.RepositorySet.path().

Assert that the following return appropriate paths:

  • RepositorySet(id=…).path()
  • RepositorySet(id=…).path('available_repositories')
  • RepositorySet(id=…).path('disable')
  • RepositorySet(id=…).path('enable')
test_snapshot()

Test nailgun.entities.Snapshot.path().

Assert that the following return appropriate paths:

  • Snapshot(id=…).path()
  • Snapshot(id=…).path('revert')
test_subscription()

Test nailgun.entities.Subscription.path().

Assert that the following return appropriate paths:

  • Subscription(organization=…).path('delete_manifest')
  • Subscription(organization=…).path('manifest_history')
  • Subscription(organization=…).path('refresh_manifest')
  • Subscription(organization=…).path('upload')
test_sync_plan()

Test nailgun.entities.SyncPlan.path().

Assert that the following return appropriate paths:

  • SyncPlan(id=…).path()
  • SyncPlan(id=…).path('add_products')
  • SyncPlan(id=…).path('remove_products')
test_system()

Test nailgun.entities.System.path().

Assert that the following return appropriate paths:

  • System().path()
  • System().path('base')
  • System(uuid=…).path()
  • System(uuid=…).path('self')
  • System(uuid=…).path('subscriptions')
class tests.test_entities.ProvisioningTemplateTestCase(methodName='runTest')

Tests for nailgun.entities.ProvisioningTemplate.

test_creation_and_update()

Check template combinations as json or entity is set on correct attribute template_combinations_attributes ( check #333)

class tests.test_entities.PuppetClassTestCase(methodName='runTest')

Tests for nailgun.entities.PuppetClass.

setUp()

Set self.puppet_class.

test_search_normalize()

Call nailgun.entities.PuppetClass.search_normalize(). Assert that returned value is a list and contains all subdictionaries.

class tests.test_entities.ReadTestCase(methodName='runTest')

Tests for nailgun.entity_mixins.EntityReadMixin.read().

setUp()

Set a server configuration at self.cfg.

test_attrs_arg_v1()

Ensure read and read_json are both called once.

This test is only appropriate for entities that override the read method in order to fiddle with the attrs argument.

test_attrs_arg_v2()

Ensure read, read_json and client.put are called once.

This test is only appropriate for entities that override the read method in order to fiddle with the attrs argument.

test_discovery_rule()

Call nailgun.entities.DiscoveryRule.read().

Ensure that the max_count attribute is fetched.

test_entity_arg()

Call read on entities that require parameters for instantiation.

Some entities require extra parameters when being instantiated. As a result, these entities must extend nailgun.entity_mixins.EntityReadMixin.read() by providing a value for the entity argument. Assert that these entities pass their server configuration objects to the child entities that they create and pass in to the entity argument.

test_entity_ids()

Test cases where the server returns unusually named attributes.

Assert that the returned attributes are renamed to be more regular before calling read().

test_host_with_interface()

Call nailgun.entities.Host.read().

Assert that host will have interfaces initialized and assigned correctly.

test_hostgroup_ignore_root_pass()

Call nailgun.entities.HostGroup.read().

Assert that the entity ignores the root_pass field.

test_http_proxy_ignore_arg()

Call nailgun.entities.HTTPProxy.read().

Assert that the entity ignores the password, organization and location field.

test_ignore_arg_v1()

Call read on a variety of entities.``.

Assert that the ignore argument is correctly passed on.

test_ignore_arg_v3()

Call nailgun.entities.AuthSourceLDAP.read().

Assert that the entity ignores the ‘account_password’ field.

test_ignore_arg_v4()

Call nailgun.entities.User.read().

Assert that entity`s predefined values of ignore are always correctly passed on.

test_interface_ignore_arg()

Call nailgun.entities.Interface.read().

Assert that entity`s predefined values of ignore are always correctly passed on.

test_parameter_ignore_arg()

Call nailgun.entities.Parameter.read().

Assert that entity`s predefined values of ignore are always correctly passed on.

test_product_with_sync_plan()

Call nailgun.entities.Product.read() for a product with sync plan assigned.

Ensure that the sync plan entity was correctly fetched.

test_snapshot_ignore_arg()

Call nailgun.entities.Snapshot.read().

Assert that entity`s predefined values of ignore are always correctly passed on.

test_subnet()

Call nailgun.entities.Subnet.read().

Ensure that the from_ attribute is successfully set.

test_usergroup_with_external_usergroup()

Call nailgun.entities.ExternalUserGroup.read() for a usergroup with external usergroup assigned.

Ensure that the external usergroup entity was correctly fetched.

class tests.test_entities.ReportTemplateTestCase(methodName='runTest')

Tests for nailgun.entities.ReportTemplate.

test_creation_and_update()

Check template combinations as json or entity is set on correct attribute template_combinations_attributes ( check #333)

test_generate()

Generate template

test_report_data()

Schedule template

test_schedule()

Schedule template

class tests.test_entities.RepositorySetTestCase(methodName='runTest')

Tests for nailgun.entities.RepositorySet.

setUp()

Set self.product.

class tests.test_entities.RepositoryTestCase(methodName='runTest')

Tests for nailgun.entities.Repository.

setUp()

Set self.repo.

test_files()

“Test for nailgun.entities.Repository.files() Assert that the method is called one with correct arguments

test_import_uploads_upload_ids()

Call nailgun.entities.Repository.import_uploads() with the upload_ids parameter.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_import_uploads_uploads()

Call nailgun.entities.Repository.import_uploads() with the uploads parameter.

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_upload_content_v1()

Call nailgun.entities.Repository.upload_content().

Make the (mock) server return a “success” status. Make the same assertions as for tests.test_entities.GenericTestCase.test_generic().

test_upload_content_v2()

Call nailgun.entities.Repository.upload_content().

Assert that nailgun.entities.APIResponseError is raised when the (mock) server fails to return a “success” status.

class tests.test_entities.SearchNormalizeTestCase(methodName='runTest')

Tests for nailgun.entity_mixins.EntitySearchMixin.search_normalize().

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_host_with_image()

Call nailgun.entities.Host.read() for a host with image assigned.

Ensure that the image entity was correctly fetched.

test_interface()

Test nailgun.entities.Interface.search_normalize().

Assert that host_id was added with correct host’s id to search results.

test_snapshot()

Test nailgun.entities.Snapshot.search_normalize().

Assert that host_id was added with correct user’s id to search results.

test_sshkey()

Test nailgun.entities.SSHKey.search_normalize().

Assert that user_id was added with correct user’s id to search results.

class tests.test_entities.SearchPayloadTestCase(methodName='runTest')

Tests for extensions of search_upload.

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_content_view_filter_rule()

errata_id field should be Errata ID when sent to the server, not DB ID.

test_generic()

Instantiate a variety of entities and call search_payload.

class tests.test_entities.SearchTestCase(methodName='runTest')

Tests for nailgun.entity_mixins.EntitySearchMixin.search().

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_host_with_image()

Call nailgun.entities.Host.search() for a host with image assigned.

Ensure that the image entity was correctly fetched.

test_product_with_sync_plan()

Call nailgun.entities.Product.search() for a product with sync plan assigned.

Ensure that the sync plan entity was correctly fetched.

class tests.test_entities.SmartProxyTestCase(methodName='runTest')

Tests for nailgun.entities.SmartProxy.

setUp()

Set self.smart_proxy.

test_import_puppetclasses()

Call nailgun.entities.SmartProxy.import_puppetclasses(). Assert that * environment parameter is not sent to requests, * proper path is built

class tests.test_entities.SrpmsTestCase(methodName='runTest')

Class with entity Srpms tests

test_to_json()

Check json serialisation on nested entities

class tests.test_entities.SubscriptionTestCase(methodName='runTest')

Tests for nailgun.entities.Subscription.

setUp()

Set self.subscription.

test__org_path()

Call nailgun.entities.Subscription._org_path.

test_methods()

Check that several helper methods are sane.

This method is just like tests.test_entities.GenericTestCase.test_generic(), but with a slightly different set of mocks. Test the following:

It would be ideal if these method could be refactored such that this unit test could be dropped.

class tests.test_entities.TemplateInputTestCase(methodName='runTest')

Tests for nailgun.entities.TemplateInput.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

class tests.test_entities.UpdatePayloadTestCase(methodName='runTest')

Tests for extensions of update_payload.

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_content_view_filter_rule()

errata_id field should be ‘translated’ from DB ID to Errata ID.

Check whether DiscoveryRule updates its search_ field.

The field should be renamed from search_ to search when update_payload is called.

test_generic()

Instantiate a variety of entities and call update_payload.

test_hostcollection_system_uuid()

Check whether HostCollection updates its system_ids field.

The field should be renamed from system_ids to system_uuids when update_payload is called.

test_image()

Check whether Image updates its path_ field.

The field should be renamed from path_ to path when update_payload is called.

test_job_template()

Create a nailgun.entities.JobTemplate.

test_media_path()

Check whether Media updates its path_ field.

The field should be renamed from path_ to path when update_payload is called.

test_organization_rh_repo_url()

Check whether Organization updates its redhat_repository_url field.

The field should be copied from p['organization']['redhat_repository_url'] to p['redhat_repository_url'] when update_payload is called.

test_os_default_template()

Check, that os_default_template serves template_kind_id and provisioning_template_id only wrapped in sub dict See: Redmine #21169.

test_subnet_from()

Check whether Subnet updates its from_ field.

The field should be renamed from from_ to from when update_payload is called.

test_syncplan_sync_date()

Test update_payload for different syncplan sync_date formats.

class tests.test_entities.UpdateTestCase(methodName='runTest')

Tests for nailgun.entity_mixins.EntityUpdateMixin.update().

classmethod setUpClass()

Set a server configuration at cls.cfg.

test_generic()

Call update on a variety of entities.

class tests.test_entities.VersionTestCase(methodName='runTest')

Tests for entities that vary based on the server’s software version.

classmethod setUpClass()

Create several server configs with different versions.

test_hostpackage()

Attempt to create a nailgun.entities.HostPackage for the Satellite 6.1.

Assert that HostPackage raises NotImplementedError exception.

test_hostsubscription()

Attempt to create a nailgun.entities.HostSubscription for the Satellite 6.1.

Assert that HostSubscription raises NotImplementedError exception.

test_lifecycle_environment()

Create a nailgun.entities.LifecycleEnvironment.

Assert that nailgun.entities.LifecycleEnvironment.create_payload() returns a dict having a prior key in Satellite 6.0.8 and prior_id in Satellite 6.1.0.

test_missing_org_id()

Test methods for which no organization ID is returned.

Affected methods:

Assert that read_json, _get_org and read are all called once, and that the second is called with the correct arguments.

test_repository_fields()

Check nailgun.entities.Repository’s fields.

Assert that Repository has fields named “docker_upstream_name” and “checksum_type”, and that “docker” is a choice for the “content_type” field starting with version 6.1.

test_system()

Attempt to create a nailgun.entities.System for the Satellite 6.2.

Assert that System raises DeprecationWarning exception.

test_systempackage()

Attempt to create a nailgun.entities.SystemPackage for the Satellite 6.1.

Assert that SystemPackage raises DeprecationWarning exception.

class tests.test_entities.VirtWhoConfigTestCase(methodName='runTest')

Tests for nailgun.entities.VirtWhoConfig

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

test_methods()

Check that get_organization_configs helper method is sane.

This method is just like tests.test_entities.GenericTestCase.test_generic(), but with a slightly different set of mocks. Test the following:

tests.test_entities.make_entity(cls, **kwargs)

Helper function to create entity with dummy ServerConfig