diff options
| author | José Tomás Tocino <theom3ga@gmail.com> | 2015-11-02 00:53:43 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-18 08:41:15 -0400 |
| commit | 39a16dd2e003f9ca82a6d061a022ced6904bd243 (patch) | |
| tree | 095501cde20167ec569edad04b8b5e0741ebab5f /tests | |
| parent | f15f4b8bb6f45dfdcb74f71e8dcc30c0aaa6ac80 (diff) | |
Fixed #25658 -- Allowed inspectdb to inspect a specific set of tables.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/inspectdb/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 6fd1778b55..37ba8db89c 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -28,6 +28,17 @@ class InspectDBTestCase(TestCase): # inspected self.assertNotIn("class DjangoContentType(models.Model):", out.getvalue(), msg=error_message) + def test_table_option(self): + """ + inspectdb can inspect a subset of tables by passing the table names as + arguments. + """ + out = StringIO() + call_command('inspectdb', 'inspectdb_people', stdout=out) + output = out.getvalue() + self.assertIn('class InspectdbPeople(models.Model):', output) + self.assertNotIn("InspectdbPeopledata", output) + def make_field_type_asserter(self): """Call inspectdb and return a function to validate a field type in its output""" out = StringIO() |
