Share and Money Management  0.16
Public Member Functions | Public Attributes | Private Member Functions | List of all members
tests.test_objects.TestObjects Class Reference

Test basic functionality with all objects from smm.objects. More...

Public Member Functions

def setUp
 Creates and initialise a (temporary) in-memory database.
def test_Exchange_objects
 Tests creating, searching and destroying smm.objects.Exchange objects.
def test_Exchange_get
 Test the smm.objects.Exchange.get() command.
def test_Share_objects
 Tests creating, searching and destroying smm.objects.Share objects.
def test_Share_get
 Test the smm.objects.Share.get() command.
def test_Currency_objects
 Tests creating, searching and destroying smm.objects.Currency objects.
def test_Currency_get
 Test the smm.objects.Currency.get() command.
def test_DailyQuote_objects
 Tests creating, searching and destroying smm.objects.DailyQuote objects.
def test_DailyQuote_get
 Test the smm.objects.DailyQuote.get() command.
def test_DailyQuote_getLast
 Tests the smm.Objects.DailyQuote.getLast() command.
def test_Transaction_objects
 Tests creating, searching and destroying smm.objects.Transaction objects.
def test_Transaction_get
 Test the smm.objects.Transaction.get() command.
def test_Transaction_getVolume
 Test the smm.objects.Transaction.getVolume() command.
def test_SMMBaseObject_AttributeConversion
 Tests the automatic conversion of attributes.
def test_SMMBaseObject_checkAttrs
 Tests checking attributes for completeness, types and values.
def test_SMMBaseObject_setAttrs
 Tests setting / update of attributes.
def test_SMMBaseObject_remove
 Test removing own object from database.
def test_Watch_objects
 Tests creating smm.objects.Watch objects.
def test_Watch_get
 Test the smm.objects.Watch.get() command.
def test_Position_objects
 Tests creating smm.objects.Position objects.
def test_Position_get
 Test the smm.objects.Position.get() command.
def test_Position_getPerf
 Tests the smm.objects.Position.getPerf() command.
def test_Position_getPerf2
 Tests the smm.objects.Position.getPerf() command.
def test_Position_getLastQuote
 Tests the smm.Position.getLastQuote() command.
def test_Position_split
 Test the smm.objects.Position.split() command.
def test_Position_swap
 Test the smm.objects.Position.swap() command.
def test_Position_worthless
 Test the smm.objects.Position.worthless() command.
def test_Config_objects
 Tests creating, searching and destroying smm.objects.Config objects.
def test_Config_get
 Test the smm.objects.Config.get() command.

Public Attributes

 store

Private Member Functions

def _checkEquality
 Check equality of two objects.

Detailed Description

Test basic functionality with all objects from smm.objects.

Tests creation, searching, adding and removing of all object classes

Member Function Documentation

def tests.test_objects.TestObjects._checkEquality (   self,
  first,
  second 
)
private

Check equality of two objects.

The function compares the id attribute as well as identity of both objects. The identity is getting using id().

Parameters
selfThe object instance itself
firstFirst object
secondSecond object

Referenced by tests.test_objects.TestObjects.test_DailyQuote_get(), tests.test_objects.TestObjects.test_Transaction_get(), and tests.test_objects.TestObjects.test_Watch_get().

Here is the caller graph for this function:

def tests.test_objects.TestObjects.setUp (   self)

Creates and initialise a (temporary) in-memory database.

References smm.db_setup.create_structure(), smm.database.init_storm(), and smm.db_setup.load_initial_data().

Here is the call graph for this function:

def tests.test_objects.TestObjects.test_Config_get (   self)

Test the smm.objects.Config.get() command.

def tests.test_objects.TestObjects.test_Config_objects (   self)

Tests creating, searching and destroying smm.objects.Config objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_Currency_get (   self)

Test the smm.objects.Currency.get() command.

def tests.test_objects.TestObjects.test_Currency_objects (   self)

Tests creating, searching and destroying smm.objects.Currency objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_DailyQuote_get (   self)

Test the smm.objects.DailyQuote.get() command.

References tests.test_objects.TestObjects._checkEquality().

Here is the call graph for this function:

def tests.test_objects.TestObjects.test_DailyQuote_getLast (   self)

Tests the smm.Objects.DailyQuote.getLast() command.

def tests.test_objects.TestObjects.test_DailyQuote_objects (   self)

Tests creating, searching and destroying smm.objects.DailyQuote objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_Exchange_get (   self)

Test the smm.objects.Exchange.get() command.

def tests.test_objects.TestObjects.test_Exchange_objects (   self)

Tests creating, searching and destroying smm.objects.Exchange objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_Position_get (   self)

Test the smm.objects.Position.get() command.

def tests.test_objects.TestObjects.test_Position_getLastQuote (   self)

Tests the smm.Position.getLastQuote() command.

def tests.test_objects.TestObjects.test_Position_getPerf (   self)

Tests the smm.objects.Position.getPerf() command.

Additionally will be tested:

def tests.test_objects.TestObjects.test_Position_getPerf2 (   self)

Tests the smm.objects.Position.getPerf() command.

def tests.test_objects.TestObjects.test_Position_objects (   self)
def tests.test_objects.TestObjects.test_Position_split (   self)

Test the smm.objects.Position.split() command.

def tests.test_objects.TestObjects.test_Position_swap (   self)

Test the smm.objects.Position.swap() command.

def tests.test_objects.TestObjects.test_Position_worthless (   self)
def tests.test_objects.TestObjects.test_Share_get (   self)

Test the smm.objects.Share.get() command.

def tests.test_objects.TestObjects.test_Share_objects (   self)

Tests creating, searching and destroying smm.objects.Share objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_SMMBaseObject_AttributeConversion (   self)

Tests the automatic conversion of attributes.

This functionality is used in all classes derivated from smm.objects.SMMBaseObject

See Also
smm.objects.SMMBaseObject._toUnicode()
smm.objects.SMMBaseObject._toDecimal()
def tests.test_objects.TestObjects.test_SMMBaseObject_checkAttrs (   self)

Tests checking attributes for completeness, types and values.

See Also
smm.objects.SMMBaseObject._checkAttrs()
def tests.test_objects.TestObjects.test_SMMBaseObject_remove (   self)

Test removing own object from database.

See Also
smm.objects.SMMBaseObject._remove()
def tests.test_objects.TestObjects.test_SMMBaseObject_setAttrs (   self)

Tests setting / update of attributes.

This functionality is used in all classes derivated from smm.objects.SMMBaseObject

See Also
smm.objects.SMMBaseObject._setAttrs()
def tests.test_objects.TestObjects.test_Transaction_get (   self)

Test the smm.objects.Transaction.get() command.

References tests.test_objects.TestObjects._checkEquality().

Here is the call graph for this function:

def tests.test_objects.TestObjects.test_Transaction_getVolume (   self)
def tests.test_objects.TestObjects.test_Transaction_objects (   self)

Tests creating, searching and destroying smm.objects.Transaction objects.

References tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

def tests.test_objects.TestObjects.test_Watch_get (   self)

Test the smm.objects.Watch.get() command.

References tests.test_objects.TestObjects._checkEquality().

Here is the call graph for this function:

def tests.test_objects.TestObjects.test_Watch_objects (   self)

Member Data Documentation

tests.test_objects.TestObjects.store

The documentation for this class was generated from the following file: