<s> from tests import test <EOL> from cloudferry . condensation import group <EOL> import mock <EOL> class GroupTest ( test . TestCase ) : <EOL> def test_add_groups ( self ) : <EOL> num = <NUM_LIT:4> <EOL> groups_to_be_added = [ mock . Mock ( ) for _ in range ( num ) ] <EOL> g = group . Group ( ) <EOL> initial_length = len ( g . children ) <EOL> g . add_groups ( groups_to_be_added ) <EOL> self . assertEqual ( initial_length + num , len ( g . children ) ) <EOL> def test_add_vms ( self ) : <EOL> num = <NUM_LIT:5> <EOL> vms_to_be_added = { i : mock . Mock ( ) for i in range ( <NUM_LIT:5> ) } <EOL> g = group . Group ( ) <EOL> initial_length = len ( g . vms ) <EOL> g . add_vms ( vms_to_be_added ) <EOL> self . assertEqual ( initial_length + num , len ( g . vms ) ) <EOL> def test_get_all_vms ( self ) : <EOL> g = group . Group ( ) <EOL> self . assertEqual ( list , type ( g . get_all_vms ( ) ) ) <EOL> def test_capacity ( self ) : <EOL> g = group . Group ( ) <EOL> self . assertEqual ( tuple , type ( g . capacity ) ) <EOL> def test_parent_count ( self ) : <EOL> g = group . Group ( ) <EOL> self . assertEqual ( int , type ( g . parent_count ( ) ) ) </s>
