Share and Money Management 0.18devel
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...

Inheritance diagram for tests.test_objects.TestObjects:

Public Member Functions

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

Public Attributes

 store
 

Private Member Functions

def _checkEquality (self, first, second)
 Check equality of two objects. More...
 

Detailed Description

Test basic functionality with all objects from smm.objects.

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

Member Function Documentation

◆ _checkEquality()

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:

◆ setUp()

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:

◆ test_Config_get()

def tests.test_objects.TestObjects.test_Config_get (   self)

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

◆ test_Config_objects()

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.

◆ test_Currency_get()

def tests.test_objects.TestObjects.test_Currency_get (   self)

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

◆ test_Currency_objects()

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.

◆ test_DailyQuote_get()

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:

◆ test_DailyQuote_getLast()

def tests.test_objects.TestObjects.test_DailyQuote_getLast (   self)

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

◆ test_DailyQuote_objects()

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.

◆ test_Exchange_get()

def tests.test_objects.TestObjects.test_Exchange_get (   self)

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

◆ test_Exchange_objects()

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.

◆ test_Position_get()

def tests.test_objects.TestObjects.test_Position_get (   self)

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

◆ test_Position_getAvgBuy()

def tests.test_objects.TestObjects.test_Position_getAvgBuy (   self)

◆ test_Position_getLastQuote()

def tests.test_objects.TestObjects.test_Position_getLastQuote (   self)

Tests the smm.Position.getLastQuote() command.

◆ test_Position_getPerf()

def tests.test_objects.TestObjects.test_Position_getPerf (   self)

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

Additionally will be tested:

◆ test_Position_getPerf2()

def tests.test_objects.TestObjects.test_Position_getPerf2 (   self)

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

◆ test_Position_objects()

def tests.test_objects.TestObjects.test_Position_objects (   self)

Tests creating smm.objects.Position objects.

References gui.log.flush(), tests.test_gui.TestGui.store, and tests.test_objects.TestObjects.store.

Here is the call graph for this function:

◆ test_Position_split()

def tests.test_objects.TestObjects.test_Position_split (   self)

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

◆ test_Position_swap()

def tests.test_objects.TestObjects.test_Position_swap (   self)

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

◆ test_Position_worthless()

def tests.test_objects.TestObjects.test_Position_worthless (   self)

◆ test_Share_get()

def tests.test_objects.TestObjects.test_Share_get (   self)

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

◆ test_Share_objects()

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.

◆ test_SMMBaseObject_AttributeConversion_Decimal()

def tests.test_objects.TestObjects.test_SMMBaseObject_AttributeConversion_Decimal (   self)

Tests the automatic conversion of attributes to Decimal values.

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

See also
smm.objects.SMMBaseObject._toDecimal()

◆ test_SMMBaseObject_remove()

def tests.test_objects.TestObjects.test_SMMBaseObject_remove (   self)

Test removing own object from database.

See also
smm.objects.SMMBaseObject._remove()

◆ test_SMMBaseObject_setAttrs()

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()

◆ test_Transaction_get()

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:

◆ test_Transaction_getVolume()

def tests.test_objects.TestObjects.test_Transaction_getVolume (   self)

◆ test_Transaction_objects()

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.

◆ test_Watch_get()

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:

◆ test_Watch_objects()

def tests.test_objects.TestObjects.test_Watch_objects (   self)

Member Data Documentation

◆ store

tests.test_objects.TestObjects.store

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