per page, with , order by , clip by
Results of 1 - 3 of about 3 for AnimalTestCase (0.005 sec.)
テストを書いて実行する 11570
テストを書いて実行する 参考 テストチュートリアル 、 テストツールリファレンス 、 テストに関する応用的なトピック も参照 ドキュメントは2つの大きなセクションに分けられます。前半のパートでは、Django でのテストの書き方を説明します。後半では、テス ... ョンの内側で実行することで、独立性を実現しています。 from django.test import TestCase from myapp.models import Animal class AnimalTestCase ( TestCase ): def setUp ( self ): Animal . objects . create ( name = "cat" , sound = "meow" ) def test_animals_can_speak ( ... nd within the 'animals' package $ ./manage.py test animals # Run just one test case class $ ./manage.py test animals.tests.AnimalTestCase # Run just one test method $ ./manage.py test animals.tests.AnimalTestCase.test_animals_can_speak ディレクトリ下に置かれた ...
https://man.mtool.work/django/6.1/topics/testing/overview.html
フィクスチャ (fixture) 9301
フィクスチャ (fixture) フィクスチャ (fixture) とは、シリアライズされたデータベースのコンテンツを含むファイルのコレクションです。各フィクスチャにはユニークな名前があり、フィクスチャを構成するファイルは、複数のアプリケーションの複数のディレク ... スチャを同じ呼び出しで指定できます。たとえば: django-admin loaddata mammals birds insects またはテストケースクラスで: class AnimalTestCase ( TestCase ): fixtures = [ "mammals" , "birds" , "insects" ] フィクスチャが読み込まれる順番は、管理コマンドを使うときでも、 ...
https://man.mtool.work/django/6.1/topics/db/fixtures.html
テストツール 7013
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... とで、ユニットテスト内でこのフィクスチャを使えます。 from django.test import TestCase from myapp.models import Animal class AnimalTestCase ( TestCase ): fixtures = [ "mammals.json" , "birds" ] def setUp ( self ): # Test definitions as before. call_setup_methods ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
PREV 1 NEXT