mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #26291 -- Added tests for dumpdata/loaddata with forward references without natural keys.
This commit is contained in:
committed by
Mariusz Felisiak
parent
fca36f3c98
commit
26799c6503
18
tests/fixtures/fixtures/forward_reference_fk.json
vendored
Normal file
18
tests/fixtures/fixtures/forward_reference_fk.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"key": "t1",
|
||||
"other_thing": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"key": "t2",
|
||||
"other_thing": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
24
tests/fixtures/fixtures/forward_reference_m2m.json
vendored
Normal file
24
tests/fixtures/fixtures/forward_reference_m2m.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
[
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"key": "t1",
|
||||
"other_things": [2, 3]
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"key": "t2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"key": "t3"
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user