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

Class DefaultDtmlPage
source code

web.DtmlPage --+
               |
              DefaultDtmlPage
Known Subclasses:
QMTestPage, QMTestReportPage

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'.
  GetName(self)
Return the name of the application.
  MakeListingUrl(self)
  GetMainPageUrl(self)
Return the URL for the main page.
  GetDatabase(self)
Returns the 'Database' in use.
  IsLabelInDirectory(self, id, directory)
Returns true if 'id' is in 'directory'.
  FormatId(self, id, type, style="basic")
Format 'id' as HTML.
  GetResultsByOutcome(self, results)
Compute the tests in 'results' with each outcome.
  GetOutcomePercentages(self, results)
Compute the percentage (by outcome) of the 'results'.
  HasModifiableExpectations(self)
Return True if expectations are modifiable.

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  
NEGATIVE_UNEXPECTED A test's result was unfavorably unexpected.
POSITIVE_UNEXPECTED A test's result was favorably unexpected.
EXPECTED A test's result was as expected.
EXPECTATION_KINDS The kinds of expectations.
outcomes  

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__

GetName(self)

source code 
Return the name of the application.

MakeListingUrl(self)

source code 

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.

HasModifiableExpectations(self)

source code 
Return True if expectations are modifiable.

Class Variable Details [hide private]

html_generator

Value:
'QMTest'                                                               
      

NEGATIVE_UNEXPECTED

A test's result was unfavorably unexpected.
Value:
'FAIL'                                                                 
      

POSITIVE_UNEXPECTED

A test's result was favorably unexpected.
Value:
'PASS'                                                                 
      

EXPECTED

A test's result was as expected.
Value:
'EXPECTED'                                                             
      

EXPECTATION_KINDS

The kinds of expectations.
Value:
['FAIL', 'EXPECTED', 'PASS']                                           
      

outcomes

Value:
['ERROR', 'FAIL', 'UNTESTED', 'PASS', 'EXPECTED']