Library for integration tests
Bases: omero.testlib.ITest
Re-usable method for a basic import
Bases: object
Moves a list of model entities (ProjectI, DatasetI or ImageI) to the target group. Accepts a client instance to guarantee calls in correct user contexts. Creates Chgrp2 commands and calls do_submit().
Parameters: |
|
---|
Changes the permissions of an ExperimenterGroup object. Accepts a client instance to guarantee calls in correct user contexts. Creates Chmod2 commands and calls do_submit().
Parameters: |
|
---|
Creates a list of the given number of Dataset instances with names of the form “name [1]”, “name [2]” etc and returns them in a list. :param count: The number of datasets to create :param description: The base name of the dataset :param client: The client to use to create the object
Creates an int8 pixel of the given size in the database. No data is written.
Creates a test image of the required dimensions, where each pixel value is set to the value of x+y. Returns the image (ImageI)
Deletes model entities (ProjectI, DatasetI, ImageI, etc) by creating Delete2 commands and calling do_submit().
Parameters: | obj – a list of objects to be deleted |
---|
Performs the request(s), waits on completion and checks that the result is not an error. The request can either be a single command or a list of commands. If the latter then the request list will be wrapped in a DoAll.
Takes an image object and return a fileset object
Creates a fake file with an images_count of images, imports the file and then return the list of images. By default a single image is imported.
Imports the specified file.
Creates fake plates and imports them.
Keeps root connection alive.
Links two linkable model entities together by creating an instance of the correct link entity (e.g. ProjectDatasetLinkI) and persisting it in the DB. Accepts client instance to allow calls to happen in correct user contexts. Currently support links are:
- project/dataset
- dataset/image
- image/annotation
Parameters: |
|
---|
Checks that login happens in less than or greater than the given time. By default, the password “BAD” is used, and the expectation is that login will take greather than the specified time since the password won’t match. To check that logins happen more quickly, pass the correct password and less=True:
login_attempt(“user”, 0.15, pw=”REALVALUE”, less=True)
See integration.tickets4000 and 5000
Creates a new dataset instance and returns the persisted object. :param name: The dataset name. If None, a UUID string will be used :param description: The dataset description :param client: The client to use to create the object
Creates a file annotation with an original file. If no name has been provided, a UUID string shall be used.
Parameters: |
|
---|
Creates a new image instance and returns the persisted object. :param name: The image name. If None, a UUID string will be used :param description: The image description :param date: The image acquisition date :param client: The client to use to create the object
Creates a new project instance and returns the persisted object. :param name: The project name. If None, a UUID string will be used :param description: The project description :param client: The client to use to create the object
Creates a new tag instance and returns the persisted object. :param name: The tag name. If None, a UUID string will be used :param client: The client to use to create the object :param ns: The namespace for the annotation. If None, do not set.
Creates and returns a pixels whose shape changes from 1,1,4000,4000,1 to 4000,4000,1,1,1 making it a pyramid candidate but without the pyramid which is created on initial import in 4.3+. This simulates a big image that was imported in 4.2.
Like new_user() but returns an active client.
Passing user= or session= will prevent self.new_user from being called, and instead the given user (by name or ExperimenterI) or session will be logged in.
Creates a new dataset object. :param name: The dataset name. If None, a UUID string will be used :param description: The dataset description
Creates a new image object. If no name has been provided, a UUID string shall be used. :param name: The image name. If None, a UUID string will be used :param description: The image description :param date: The image acquisition date
Creates a new project object. :param name: The project name. If None, a UUID string will be used :param description: The project description
Creates a new tag object. :param name: The tag name. If None, a UUID string will be used :param ns: The namespace for the annotation. If None, do not set.
Owner: | If user is to be an owner of the created group |
---|---|
System: | If user is to be a system admin |
Skip test if configuration does not meet condition
Wait on an omero.cmd.HandlePrx to finish processing and then assert pass or fail. The callback is returned for accessing the Response and Status elements.
Writes byte arrays consisting of [5] to as either planes or tiles depending on the pixel size.
alias of ProjectionFixture