Rename a few tests to follow standards. Move fits into a helper so they can be reused. Add two new Eos tests.
(cherry picked from commit f87ac4d)
This commit is contained in:
@@ -130,8 +130,10 @@ def Saveddata():
|
||||
from eos.saveddata.fit import Fit
|
||||
from eos.saveddata.character import Character
|
||||
from eos.saveddata.module import Module, State
|
||||
from eos.saveddata.citadel import Citadel
|
||||
|
||||
helper = {
|
||||
'Structure': Citadel,
|
||||
'Ship' : Ship,
|
||||
'Fit' : Fit,
|
||||
'Character': Character,
|
||||
|
||||
28
_development/helpers_fits.py
Normal file
28
_development/helpers_fits.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
|
||||
# noinspection PyPackageRequirements
|
||||
from _development.helpers import DBInMemory as DB, Gamedata, Saveddata
|
||||
|
||||
|
||||
# noinspection PyShadowingNames
|
||||
@pytest.fixture
|
||||
def RifterFit(DB, Gamedata, Saveddata):
|
||||
print("Creating Rifter")
|
||||
item = DB['gamedata_session'].query(Gamedata['Item']).filter(Gamedata['Item'].name == "Rifter").first()
|
||||
ship = Saveddata['Ship'](item)
|
||||
# setup fit
|
||||
fit = Saveddata['Fit'](ship, "My Rifter Fit")
|
||||
|
||||
return fit
|
||||
|
||||
|
||||
# noinspection PyShadowingNames
|
||||
@pytest.fixture
|
||||
def KeepstarFit(DB, Gamedata, Saveddata):
|
||||
print("Creating Keepstar")
|
||||
item = DB['gamedata_session'].query(Gamedata['Item']).filter(Gamedata['Item'].name == "Keepstar").first()
|
||||
ship = Saveddata['Structure'](item)
|
||||
# setup fit
|
||||
fit = Saveddata['Fit'](ship, "Keepstar Fit")
|
||||
|
||||
return fit
|
||||
Reference in New Issue
Block a user