I wrote a unit test to verify that the source data was loading correctly. However, it Node.objects.all().count()always returns 0, so it seems that the lights do not load at all. There is no exit / error message on the command line that does not load.
from core.models import Node
class NodeTableTestCase(unittest.TestCase):
fixtures = ['core/core_fixture.json']
def setUp(self):
print "nothing to prepare..."
def testFixture(self):
"""Check if initial data can be loaded correctly"""
self.assertEqual(Node.objects.all().count(), 14)
the device core_fixture.jsoncontains 14 nodes, and I use this device as the initial data load in db using the following command:
python manage.py loaddata core/core_fixture.json
They are located in the folder I specified in the setting settings.py FIXTURE_DIRS.
source
share