Package Camelot :: Package camelot :: Package test :: Class EntityViewsTest |
[frames] | no frames]

# Class EntityViewsTest

source code

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)]

Nested Classes
Inherited from `unittest.TestCase`: `failureException`

Instance Methods
setUp(self) Hook method for setting up the test fixture before exercising it. | source code
get_application_admin(self) Overwrite this method to make use of a custom application admin | source code
get_admins(self) Should return all admin for which a table and a form view should be displayed, by default, returns for all entities their default admin | source code
test_select_view(self) | source code
test_table_view(self) | source code
test_new_view(self) | source code
Inherited from `ModelThreadTestCase`: `grab_widget`, `process`, `tearDown` Inherited from `unittest.TestCase`: `__call__`, `__eq__`, `__hash__`, `__init__`, `__ne__`, `__repr__`, `__str__`, `assertAlmostEqual`, `assertAlmostEquals`, `assertEqual`, `assertEquals`, `assertFalse`, `assertNotAlmostEqual`, `assertNotAlmostEquals`, `assertNotEqual`, `assertNotEquals`, `assertRaises`, `assertTrue`, `assert_`, `countTestCases`, `debug`, `defaultTestResult`, `fail`, `failIf`, `failIfAlmostEqual`, `failIfEqual`, `failUnless`, `failUnlessAlmostEqual`, `failUnlessEqual`, `failUnlessRaises`, `id`, `run`, `shortDescription` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
Inherited from `ModelThreadTestCase`: `images_path`

Properties
Inherited from `object`: `__class__`

Method Details

### setUp(self) | source code
Hook method for setting up the test fixture before exercising it. Overrides: unittest.TestCase.setUp (inherited documentation)