Module unittesting :: Class TestBandwidthHistory
[hide private]
[frames] | no frames]

Class TestBandwidthHistory

source code


Tests BandwidthHistory from iface.py

Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
testInitBadSize(self)
Size must be greater than 0
source code
 
testInitBadIfaceList(self)
Passes empty list of dictionaries into the history
source code
 
testSizeEnlarge(self)
Tests if size gets enlarged correctly
source code
 
testSizeShrink(self)
Tests if size gets shrinked correctly
source code
 
testSizeSanity(self)
Enlarges and then shrinks size, tests if remains same
source code
 
testSizeZero(self)
Tests that size cannot be set to be zero
source code
 
testSizeNegative(self)
Tests that size cannot be set to be negative
source code
 
testGetSize(self)
Initializes history to a known size, tests if it gets returned correctly bu get_size
source code
 
testGetHistory(self)
Tests if history after initialization matches expected data
source code
 
testGetHistoryIface(self)
Tests if history for a given inteface after initialization matches expected data
source code
 
testPushDontStoreFirstValue(self)
Tests that the first value does not get stored so we avoid a spike at the beginning of the program
source code
 
testPush(self)
Tests if data get stored correctly in the history object
source code
 
testPushAndEnlarge(self)
Tests if a history made large than items stored will contain zeroes
source code
 
testPushAndCrop(self)
Tests if history is sane if shrunk to smaller size than the amount of values it contains
source code
 
testPushOverflow(self)
Test if the values shift correctly if we push more data than the history can handle
source code
 
testPushMaxInOut(self) 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, setUp, shortDescription, tearDown

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

Properties [hide private]

Inherited from object: __class__