per page, with , order by , clip by
Results of 1 - 10 of about 66 for TestCase (0.012 sec.)
テストツール — Django 6.1 ドキュメント 13856
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストツール ¶ Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecos ... トするために使います。また、Django はこれらのフレームワーク向けの特別なサポートも提供しています。詳細については、 LiveServerTestCase のセクションを読んでください。 包括的なテストスイートを実現するには、これらすべてのタイプのテストを組み合わせて行うべきです ... テストクライアントを使ったユニットテストです。 import unittest from django.test import Client class SimpleTest ( unittest . TestCase ): def setUp ( self ): # Every test needs a client. self . client = Client () def test_details ( self ): # Issue a GET req ... ]), 5 ) 参考 django.test.RequestFactory 提供されるテストケースのクラス ¶ 標準の Python ユニットテストのクラスは、 unittest.TestCase のベースクラスを拡張しています。Django は、このベースクラスのいくつかの拡張を提供します。 Django ユニットテストクラスの階層 ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
テストツール — Django 6.1 ドキュメント 13784
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストツール ¶ Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecos ... トするために使います。また、Django はこれらのフレームワーク向けの特別なサポートも提供しています。詳細については、 LiveServerTestCase のセクションを読んでください。 包括的なテストスイートを実現するには、これらすべてのタイプのテストを組み合わせて行うべきです ... テストクライアントを使ったユニットテストです。 import unittest from django.test import Client class SimpleTest ( unittest . TestCase ): def setUp ( self ): # Every test needs a client. self . client = Client () def test_details ( self ): # Issue a GET req ... ]), 5 ) 参考 django.test.RequestFactory 提供されるテストケースのクラス ¶ 標準の Python ユニットテストのクラスは、 unittest.TestCase のベースクラスを拡張しています。Django は、このベースクラスのいくつかの拡張を提供します。 Django ユニットテストクラスの階層 ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
テストを書いて実行する — Django 6.1 ドキュメント 10459
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストを書いて実行する ¶ 参考 テストチュートリアル 、 テストツールリファレンス 、 テストに関する応用的なトピック も参照 ドキュメントは2つの大きなセク ... のモジュール、 unittest を使用します。このモジュールは、テストをクラスベースのアプローチで定義します。 次の例では、 unittest.TestCase のサブクラスである django.test.TestCase から、テスト用の新しいサブクラスを作っています。各テストをトランザクションの内側で ... 実行することで、独立性を実現しています。 from django.test import TestCase from myapp.models import Animal class AnimalTestCase ( TestCase ): def setUp ( self ): Animal . objects . create ( name = ... トユーティリティのデフォルトの動作として、ファイル名が test で始まるファイル内のすべてのテストケースクラス (つまり unittest.TestCase のサブクラス) を見つけ、それらのテストケースクラスから自動的にテストスイートを構築し、そのテストスイートを実行します。 uni ...
https://man.mtool.work/django/6.1/topics/testing/overview.html
テストを書いて実行する — Django 6.1 ドキュメント 10459
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストを書いて実行する ¶ 参考 テストチュートリアル 、 テストツールリファレンス 、 テストに関する応用的なトピック も参照 ドキュメントは2つの大きなセク ... のモジュール、 unittest を使用します。このモジュールは、テストをクラスベースのアプローチで定義します。 次の例では、 unittest.TestCase のサブクラスである django.test.TestCase から、テスト用の新しいサブクラスを作っています。各テストをトランザクションの内側で ... 実行することで、独立性を実現しています。 from django.test import TestCase from myapp.models import Animal class AnimalTestCase ( TestCase ): def setUp ( self ): Animal . objects . create ( name = ... トユーティリティのデフォルトの動作として、ファイル名が test で始まるファイル内のすべてのテストケースクラス (つまり unittest.TestCase のサブクラス) を見つけ、それらのテストケースクラスから自動的にテストスイートを構築し、そのテストスイートを実行します。 uni ...
https://man.mtool.work/django/6.1/topics/testing/overview.html
テストに関する高度なトピック — Django 6.1 ドキュメント 8947
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストに関する高度なトピック ¶ RequestFactory(リクエスト ファクトリ) ¶ class RequestFactory [ソース] ¶ RequestFactory はテストクライアントと同じ A ... ったユニットテストです: from django.contrib.auth.models import AnonymousUser , User from django.test import RequestFactory , TestCase from .views import MyView , my_view class SimpleTest ( TestCase ): def setUp ( self ): # Every test needs access to the re ... するには、まずビューをインスタンス化して setup() に request を渡します: tests.py ¶ from django.test import RequestFactory , TestCase from .views import HomeView class HomePageTest ( TestCase ): def test_environment_set_in_context ( self ): request = Reque ... ファイルに追加することです。例えば、docs.djangoproject.com のテストスイートには以下が含まれています: from django.test import TestCase class SearchFormTestCase ( TestCase ): def test_empty_get ( self ): response = self . client . get ( "/en/dev/search/" , h ...
https://man.mtool.work/django/6.1/topics/testing/advanced.html
テストに関する高度なトピック — Django 6.1 ドキュメント 8947
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テストに関する高度なトピック ¶ RequestFactory(リクエスト ファクトリ) ¶ class RequestFactory [ソース] ¶ RequestFactory はテストクライアントと同じ A ... ったユニットテストです: from django.contrib.auth.models import AnonymousUser , User from django.test import RequestFactory , TestCase from .views import MyView , my_view class SimpleTest ( TestCase ): def setUp ( self ): # Every test needs access to the re ... するには、まずビューをインスタンス化して setup() に request を渡します: tests.py ¶ from django.test import RequestFactory , TestCase from .views import HomeView class HomePageTest ( TestCase ): def test_environment_set_in_context ( self ): request = Reque ... ファイルに追加することです。例えば、docs.djangoproject.com のテストスイートには以下が含まれています: from django.test import TestCase class SearchFormTestCase ( TestCase ): def test_empty_get ( self ): response = self . client . get ( "/en/dev/search/" , h ...
https://man.mtool.work/django/6.1/topics/testing/advanced.html
はじめての Django アプリ作成、その 5 — Django 6.1 ドキュメント 7634
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » はじめての Django アプリ作成、その 5 ¶ このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作 ... olls アプリケーションの tests.py ファイルに次のコードを書きます。 polls/tests.py ¶ import datetime from django.test import TestCase from django.utils import timezone from .models import Question class QuestionModelTests ( TestCase ): def test_was_publish ... ed_recently (), False ) ここでは、未来の日付の pub_date を持つ Question のインスタンスを生成するメソッドを持つ django.test.TestCase を継承したサブクラスを作っています。それから、 was_published_recently() の出力をチェックしています。これは False になるはず ... こでは以下のようなことが起こりました。 manage.py test polls は、 polls アプリケーション内にあるテストを探します django.test.TestCase クラスのサブクラスを発見します テストのための特別なデータベースを作成します テスト用のメソッドとして、 test で始まるメソッ ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
Django 1.8 リリースノート — Django 6.1 ドキュメント 7634
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.8 リリースノート ¶ April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレー ... n queries. A collection of database functions is also included with functionality such as Coalesce , Concat , and Substr . TestCase data setup ¶ TestCase has been refactored to allow for data initialization at the class level using transactions and savep ... ents. Tests are now run within two nested atomic() blocks: one for the whole class and one for each test. The class method TestCase.setUpTestData() adds the ability to set up test data at the class level. Using this technique can speed up the tests as co ... mpared to using setUp() . Fixture loading within TestCase is now performed once for the whole TestCase . マイナーな機能 ¶ django.contrib.admin ¶ ModelAdmin now has a has_module_per ...
https://man.mtool.work/django/6.1/releases/1.8.html
はじめての Django アプリ作成、その 5 — Django 6.1 ドキュメント 7634
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » はじめての Django アプリ作成、その 5 ¶ このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作 ... olls アプリケーションの tests.py ファイルに次のコードを書きます。 polls/tests.py ¶ import datetime from django.test import TestCase from django.utils import timezone from .models import Question class QuestionModelTests ( TestCase ): def test_was_publish ... ed_recently (), False ) ここでは、未来の日付の pub_date を持つ Question のインスタンスを生成するメソッドを持つ django.test.TestCase を継承したサブクラスを作っています。それから、 was_published_recently() の出力をチェックしています。これは False になるはず ... こでは以下のようなことが起こりました。 manage.py test polls は、 polls アプリケーション内にあるテストを探します django.test.TestCase クラスのサブクラスを発見します テストのための特別なデータベースを作成します テスト用のメソッドとして、 test で始まるメソッ ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
Django 1.8 リリースノート — Django 6.1 ドキュメント 7634
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django 1.8 リリースノート ¶ April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレー ... n queries. A collection of database functions is also included with functionality such as Coalesce , Concat , and Substr . TestCase data setup ¶ TestCase has been refactored to allow for data initialization at the class level using transactions and savep ... ents. Tests are now run within two nested atomic() blocks: one for the whole class and one for each test. The class method TestCase.setUpTestData() adds the ability to set up test data at the class level. Using this technique can speed up the tests as co ... mpared to using setUp() . Fixture loading within TestCase is now performed once for the whole TestCase . マイナーな機能 ¶ django.contrib.admin ¶ ModelAdmin now has a has_module_per ...
https://man.mtool.work/django/6.1/releases/1.8.html
PREV 1 2 3 4 5 6 7 NEXT