def test_set_gravity_wrongly(self): planetx = Planet('planet', size='small', organic='rich', mineral='average', environment='toxic') planetx.gravity = 'jupajda'
def test_set_gravity_correctly(self): planetx = Planet('planet', size='small', organic='rich', mineral='average', environment='toxic') gravity = ('low', 'medium', 'heavy') for i in gravity: planetx.gravity = i eq_(planetx.gravity, i)
def test_gravity_del(self): planetx = Planet('planet', size='tiny', organic='rich', mineral='poor', environment='toxic') planetx.gravity = 'heavy' eq_(planetx.gravity, 'heavy') del planetx.gravity eq_(planetx.gravity, 'low')
def test_set_gravity_asteroids2(self): planetx = Planet('asteroids') planetx.gravity = None eq_(planetx.gravity, None)
def test_set_gravity_asteroids(self): planetx = Planet('asteroids') planetx.gravity = 'heavy'
def test_set_gravity_giant(self): planetx = Planet('giant') planetx.gravity = 'heavy'