Module TwoPartyLegislature :: Class TestBill
[hide private]
[frames] | no frames]

Class TestBill

source code

       object --+    
                |    
unittest.TestCase --+
                    |
                   TestBill

Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
test_get_party(self)
get_party() should return the previously specified party
source code
 
test_get_ideology(self)
get_ideology() should return the previously specified ideology
source code
 
test_get_bill_num(self)
get_bill_num() should return the previously specified bill number
source code
 
test_get_record_datatypes(self)
get_record() should return dictionary of agent votes
source code
 
test_set_bill_num(self)
set_bill_num() should set the bill number
source code
 
test_set_party(self)
set_party() should set the bill's party
source code
 
test_set_ideology(self)
set_ideology() should set the bill's ideology
source code
 
test_set_passage(self)
set_passage() if the bill passed
source code
 
test_add_record(self)
add_record() ads a vote for a particular agent
source code
 
test_num_lib_yays(self)
num_liberal_yays() should return number of liberal party agents voting yes
source code
 
test_num_consv_yays(self)
num_conservative_yays() should return number of conservative party agents voting yes
source code
 
test_info_no_votes(self)
info() should handle bill that hasn't been voted on
source code
 
test_info_with_votes(self)
info() should handle bill that has been voted on
source code

Inherited from unittest.TestCase: __call__, __init__, __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, tearDown

Inherited from unittest.TestCase (private): _exc_info

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  bill = None
  billid = 3
  ideology = 0.4
  party = 1
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

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