Package qm :: Package test :: Package web :: Module web :: Class DefaultDtmlPage
[hide private]
[frames] | no frames]

Class DefaultDtmlPage

source code

web.DtmlPage --+
               |
              DefaultDtmlPage

Subclass of DTML page class for QMTest pages.

Nested Classes [hide private]

Inherited from web.DtmlPage: default_class

Instance Methods [hide private]
 
__init__(self, dtml_template, server, **attributes)
Construct a new 'QMTestPage'.
source code
 
GetName(self)
Return the name of the application.
source code
 
MakeListingUrl(self) source code
 
GetMainPageUrl(self)
Return the URL for the main page.
source code
 
GetDatabase(self)
Returns the 'Database' in use.
source code
 
IsLabelInDirectory(self, id, directory)
Returns true if 'id' is in 'directory'.
source code
 
FormatId(self, id, type, style="basic")
Format 'id' as HTML.
source code
 
GetResultsByOutcome(self, results)
Compute the tests in 'results' with each outcome.
source code
 
GetOutcomePercentages(self, results)
Compute the percentage (by outcome) of the 'results'.
source code
 
HasModifiableExpectations(self)
Return True if expectations are modifiable.
source code

Inherited from web.DtmlPage: GenerateEndBody, GenerateEndScript, GenerateHtmlHeader, GenerateStartBody, GenerateStartScript, GenerateXMLHeader, GetProgramName, MakeButton, MakeImageUrl, MakeLoginForm, MakeRule, MakeSpacer, UserIsInGroup, WebRequest, __call__

Class Variables [hide private]
  html_generator = "QMTest"
  NEGATIVE_UNEXPECTED = 'FAIL'
A test's result was unfavorably unexpected.
  POSITIVE_UNEXPECTED = 'PASS'
A test's result was favorably unexpected.
  EXPECTED = "EXPECTED"
A test's result was as expected.
  EXPECTATION_KINDS = [NEGATIVE_UNEXPECTED, EXPECTED, POSITIVE_U...
The kinds of expectations.
  outcomes = Result.outcomes+ [EXPECTED]

Inherited from web.DtmlPage: common_javascript, html_stylesheet, qm_bug_system_url, web

Method Details [hide private]

__init__(self, dtml_template, server, **attributes)
(Constructor)

source code 

Construct a new 'QMTestPage'.

'server' -- The 'QMTestServer' creating this page.

'dtml_template' -- The file name of the DTML template, relative to the DTML directory.

Overrides: web.DtmlPage.__init__

GetMainPageUrl(self)

source code 

Return the URL for the main page.

Overrides: web.DtmlPage.GetMainPageUrl
(inherited documentation)

GetDatabase(self)

source code 

Returns the 'Database' in use.

returns -- The 'Database' in use.

IsLabelInDirectory(self, id, directory)

source code 

Returns true if 'id' is in 'directory'.

returns -- True if 'id' indicates a test contained in 'directory', or one of its subdirectories.

FormatId(self, id, type, style="basic")

source code 

Format 'id' as HTML.

'id' -- The name of a test or resource.

'type' -- The kind of item named by 'id'. Either 'resource', 'suite', or 'test'.

'style' -- The formatting style to use. One of 'plain', 'basic', 'navigation', or 'tree'.

returns -- A string containing HTML to use for 'id'.

GetResultsByOutcome(self, results)

source code 

Compute the tests in 'results' with each outcome.

'results' -- A sequence of 'Result' instances.

returns -- A dictionary mapping outcomes to the sequence of tests that have the indicated outcome in 'results'.

GetOutcomePercentages(self, results)

source code 

Compute the percentage (by outcome) of the 'results'.

'results' -- A sequence of 'Result' instances.

returns -- A dictionary mapping outcomes to the percentage (as a floating point number) of tests in 'results' that have that outcome.


Class Variable Details [hide private]

EXPECTATION_KINDS

The kinds of expectations.

Value:
[NEGATIVE_UNEXPECTED, EXPECTED, POSITIVE_UNEXPECTED]