test

Camelot unittest framework

class camelot.test.ApplicationViewsTest(methodName='runTest')[source]

Test various application level views, like the main window, the sidepanel

get_application_admin()[source]

Overwrite this method to make use of a custom application admin

class camelot.test.EntityViewsTest(methodName='runTest')[source]

Test the views of all the Entity subclasses, subclass this class to test all views in your application. This is done by calling the create_table_view and create_new_view on a set of admin objects. To tell the test case which admin objects should be tested, overwrite the get_admins method

class MyEntityViewsTest(EntityViewsTest):

def get_admins(self):
from elixir import entities application_admin import MyApplicationAdmin self.app_admin = MyApplicationAdmin() return [self.app_admin.get_entity_admin(e) for e in entities if self.app_admin.get_entity_admin(e)]
get_admins()[source]

Should return all admin for which a table and a form view should be displayed, by default, returns for all entities their default admin

get_application_admin()[source]

Overwrite this method to make use of a custom application admin

class camelot.test.ModelThreadTestCase(methodName='runTest')[source]

Base class for implementing test cases that need a running model_thread.

grab_widget(widget, suffix=None, subdir=None)[source]

Save a widget as a png file : :param widget: the widget to take a screenshot of :param suffix: string to add to the default filename of the image :param subdir: subdirectory of images_path in which to put the image file, defaults to the name of the test class - the name of the png file is the name of the test case, without ‘test‘ - it is stored in the directory with the same name as the class, without ‘test’

process()[source]

Wait until all events are processed and the queues of the model thread are empty

class camelot.test.SchemaTest(methodName='runTest')[source]

Test the database schema

camelot.test.get_application()[source]

Get the singleton QApplication

Previous topic

type_and_status

Next topic

http_proxy

This Page


Comments
blog comments powered by Disqus