Windows 8.1 で Python 2.7.8 を使用して相対パスからフィクスチャをロードしていない Django 1.6.6 プロジェクトがあります。Linuxで問題なく動作します。
テストケースの例:
# cart/tests.py
class CartTestBase(TestCase):
fixtures = ['products/fixtures/product_categories.json',
'products/fixtures/brands.json', 'products/fixtures/products.json']
次のディレクトリ構造に適合します。
ecomm_app/
cart/
__init__.py
models.py
tests.py
. . .
products/
fixtures/
products/fixtures/product_categories.json
products/fixtures/brands.json
products/fixtures/products.json
__init__.py
models.py
. . .
具体的なエラー メッセージは次のとおりです。
UserWarning: No fixture named 'products/fixtures/products' found.
warnings.warn("No fixture named '%s' found." % fixture_name)
対応するアプリ モジュールは にリストされており、それ以外の場合はINSTALLED_APPS
正常に動作します。絶対パスの指定は機能しますが、明らかにクロスプラットフォームではありません。ルート相対パスの指定は機能しません。例:/products/fixtures/brands.json
これらのフィクスチャで何が起こっていますか?