Skip to content

Commit

Permalink
turning on sqla obsinfo test
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Apr 22, 2020
1 parent b7c6fc2 commit fd7c106
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/sqladbs/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from __future__ import absolute_import, division, print_function

import factory
#from tests.helpers import create_factory, create_fake_columns
from tests.helpers import create_factory, create_fake_columns
from tests.sqladbs import database as db
from tests.sqladbs import get_model_from_database, models

Expand Down Expand Up @@ -65,9 +65,9 @@ class Meta:
wavelength = faker.pylist(10, False, 'float')
bintype = 'NAN'

# # auto generate a factory class with fake data generators for all columns
# ObsinfoFactory = create_factory('ObsinfoFactory', mangadb, datadb.ObsInfo,
# base=factory.alchemy.SQLAlchemyModelFactory)
# auto generate a factory class with fake data generators for all columns
ObsinfoFactory = create_factory('ObsinfoFactory', mangadb, datadb.ObsInfo,
base=factory.alchemy.SQLAlchemyModelFactory)

if sas:
class TreeFactory(factory.alchemy.SQLAlchemyModelFactory):
Expand Down
8 changes: 4 additions & 4 deletions tests/sqladbs/test_mangadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_cube_count(self, session):
cc = session.query(datadb.Cube).count()
assert cc > 1

# def test_obsinfo_model_creation(self, obsinfo_factory):
# obs = obsinfo_factory.build()
# assert obs.pk is not None
# assert obs.airmass > 0
def test_obsinfo_model_creation(self, obsinfo_factory):
obs = obsinfo_factory.build()
assert obs.pk is not None
assert obs.airmass > 0

0 comments on commit fd7c106

Please sign in to comment.