Пример #1
0
def remote_system(remote_garden):
    system = System(name="somesystem",
                    version="1.0.0",
                    namespace=remote_garden.name).save()

    yield system
    system.delete()
Пример #2
0
def test_system_2_0_0(role_assignment_for_system_scope):
    system = System(
        version="2.0.0", **role_assignment_for_system_scope.domain.identifiers
    ).save()

    yield system
    system.delete()
Пример #3
0
def local_system(local_garden):
    system = System(name="somesystem",
                    version="1.0.0",
                    namespace=local_garden.name).save()

    yield system
    system.delete()
Пример #4
0
def system_not_permitted(garden):
    system = System(name="not_permitted",
                    version="1.0.0",
                    namespace=garden.name).save()

    yield system
    system.delete()
Пример #5
0
def system_not_permitted(garden):
    system = System(
        name="system_not_permitted",
        version="0.0.1",
        namespace=garden.name,
        commands=[Command(name="command_not_permitted")],
    ).save()

    yield system
    system.delete()
Пример #6
0
def system_permitted(garden):
    system = System(
        name="permitted_system",
        version="0.0.1",
        namespace=garden.name,
        commands=[Command(name="icandoit")],
    ).save()

    yield system
    system.delete()
Пример #7
0
def system(garden):
    instance = Instance(name="instance")
    system = System(
        name="system",
        version="1.0.0",
        namespace=garden.name,
        instances=[instance],
    ).save()

    yield system
    system.delete()
Пример #8
0
    def default_system(self, default_command, default_instance):
        default_system = System(
            id="1234",
            name="foo",
            version="1.0.0",
            namespace="ns",
            instances=[default_instance],
            commands=[default_command],
        )
        default_system.save = Mock()
        default_system.validate = Mock()
        default_system.delete = Mock()

        return default_system