mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #23099 -- Removed usage of deprecated initial data in Django's test suite.
Thanks Claude Paroz for assistance with debugging the tests.
This commit is contained in:
parent
73ff4498aa
commit
f53b1c779b
314
django/contrib/gis/tests/distapp/fixtures/initial.json
Normal file
314
django/contrib/gis/tests/distapp/fixtures/initial.json
Normal file
@ -0,0 +1,314 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Downtown Houston",
|
||||
"point": "SRID=32140;POINT (951640.5473284651525319 4219369.2617166414856911)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "West University Place",
|
||||
"point": "SRID=32140;POINT (943547.9223275661934167 4213623.6534501984715462)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Southside Place",
|
||||
"point": "SRID=32140;POINT (944704.6433068963233382 4212768.8761719493195415)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Bellaire",
|
||||
"point": "SRID=32140;POINT (942595.6691285020206124 4212686.7258348800241947)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Pearland",
|
||||
"point": "SRID=32140;POINT (959674.6165056140162051 4197465.6525986101478338)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 6,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Galveston",
|
||||
"point": "SRID=32140;POINT (1008151.1600717274704948 4170027.4765489147976041)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 7,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Sealy",
|
||||
"point": "SRID=32140;POINT (874859.2868079885374755 4219186.8640952249988914)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 8,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "San Antonio",
|
||||
"point": "SRID=32140;POINT (649173.9104827501578256 4176413.2778564509935677)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 9,
|
||||
"model": "distapp.southtexascity",
|
||||
"fields": {
|
||||
"name": "Saint Hedwig",
|
||||
"point": "SRID=32140;POINT (677644.6499522707890719 4175467.0674387565813959)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Downtown Houston",
|
||||
"point": "SRID=2278;POINT (3122174.0290268082171679 13843047.3191486913710833)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "West University Place",
|
||||
"point": "SRID=2278;POINT (3095623.4751696921885014 13824196.9360278695821762)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Southside Place",
|
||||
"point": "SRID=2278;POINT (3099418.4839160442352295 13821392.5542408134788275)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Bellaire",
|
||||
"point": "SRID=2278;POINT (3092499.2911324291490018 13821123.0326766129583120)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Pearland",
|
||||
"point": "SRID=2278;POINT (3148532.4709855038672686 13771185.2282339502125978)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 6,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Galveston",
|
||||
"point": "SRID=2278;POINT (3307575.9310019947588444 13681165.1456442419439554)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 7,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Sealy",
|
||||
"point": "SRID=2278;POINT (2870267.5101358774118125 13842448.9029524270445108)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 8,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "San Antonio",
|
||||
"point": "SRID=2278;POINT (2129831.4046421577222645 13702115.8954340498894453)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 9,
|
||||
"model": "distapp.southtexascityft",
|
||||
"fields": {
|
||||
"name": "Saint Hedwig",
|
||||
"point": "SRID=2278;POINT (2223239.1557184099219739 13699011.5367553308606148)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Wollongong",
|
||||
"point": "SRID=4326;POINT (150.9019999999999868 -34.4245000000000019)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Shellharbour",
|
||||
"point": "SRID=4326;POINT (150.8700000000000045 -34.5788999999999973)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Thirroul",
|
||||
"point": "SRID=4326;POINT (150.9240000000000066 -34.3147000000000020)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Mittagong",
|
||||
"point": "SRID=4326;POINT (150.4490000000000123 -34.4508999999999972)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Batemans Bay",
|
||||
"point": "SRID=4326;POINT (150.1750000000000114 -35.7081999999999979)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 6,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Canberra",
|
||||
"point": "SRID=4326;POINT (144.9629999999999939 -37.8143000000000029)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 7,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Melbourne",
|
||||
"point": "SRID=4326;POINT (145.9629999999999939 -37.8143000000000029)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 8,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Sydney",
|
||||
"point": "SRID=4326;POINT (151.2607099999999889 -33.8870339999999999)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 9,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Hobart",
|
||||
"point": "SRID=4326;POINT (147.3300000000000125 -42.8826999999999998)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 10,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Adelaide",
|
||||
"point": "SRID=4326;POINT (138.5999999999999943 -34.9258000000000024)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 11,
|
||||
"model": "distapp.australiacity",
|
||||
"fields": {
|
||||
"name": "Hillsdale",
|
||||
"point": "SRID=4326;POINT (151.2313409999999863 -33.9526850000000024)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.censuszipcode",
|
||||
"fields": {
|
||||
"name": "77002",
|
||||
"poly": "SRID=4269;POLYGON ((-95.3650149999999996 29.7723270000000007, -95.3624149999999986 29.7723270000000007, -95.3609150000000056 29.7718269999999983, -95.3546149999999955 29.7718269999999983, -95.3515150000000062 29.7725270000000002, -95.3509150000000005 29.7653269999999992, -95.3510150000000039 29.7624360000000010, -95.3501150000000024 29.7603280000000012, -95.3475150000000014 29.7585279999999983, -95.3523150000000044 29.7539279999999984, -95.3564149999999984 29.7563279999999999, -95.3582150000000013 29.7540280000000017, -95.3602149999999966 29.7563279999999999, -95.3634150000000034 29.7571280000000016, -95.3640139999999974 29.7563800000000001, -95.3634150000000034 29.7539279999999984, -95.3600150000000042 29.7518279999999997, -95.3618150000000071 29.7495280000000015, -95.3627149999999943 29.7500280000000004, -95.3675159999999948 29.7441279999999999, -95.3693159999999978 29.7451280000000011, -95.3739159999999941 29.7441279999999999, -95.3801160000000010 29.7380279999999999, -95.3879160000000041 29.7279289999999996, -95.3885159999999956 29.7296289999999992, -95.3879160000000041 29.7321290000000005, -95.3829159999999945 29.7374280000000013, -95.3766159999999985 29.7422280000000008, -95.3726159999999936 29.7472279999999998, -95.3786010000000033 29.7508459999999992, -95.3786159999999938 29.7520279999999993, -95.3786159999999938 29.7544280000000008, -95.3760160000000070 29.7545280000000005, -95.3746160000000032 29.7598279999999988, -95.3736159999999984 29.7611279999999994, -95.3719159999999988 29.7639279999999999, -95.3723159999999979 29.7687269999999984, -95.3658839999999941 29.7679100000000005, -95.3660150000000044 29.7671269999999986, -95.3587150000000037 29.7653269999999992, -95.3586150000000004 29.7663270000000004, -95.3591150000000027 29.7672269999999983, -95.3602149999999966 29.7670269999999988, -95.3627829999999932 29.7682670000000016, -95.3653149999999954 29.7705270000000013, -95.3650149999999996 29.7723270000000007))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "distapp.censuszipcode",
|
||||
"fields": {
|
||||
"name": "77005",
|
||||
"poly": "SRID=4269;POLYGON ((-95.4479180000000014 29.7272749999999988, -95.4280169999999970 29.7287290000000013, -95.4211169999999953 29.7290290000000006, -95.4186169999999976 29.7276290000000003, -95.4185169999999943 29.7264289999999995, -95.4021170000000041 29.7266289999999991, -95.4021170000000041 29.7257290000000012, -95.3953159999999940 29.7257290000000012, -95.3919159999999948 29.7262290000000000, -95.3897160000000071 29.7258290000000009, -95.3965170000000029 29.7154290000000003, -95.3975169999999935 29.7159289999999991, -95.4009170000000069 29.7114289999999990, -95.4114170000000001 29.7150290000000012, -95.4184170000000051 29.7147289999999984, -95.4183170000000018 29.7062300000000015, -95.4408179999999930 29.7059299999999986, -95.4450180000000046 29.7068300000000001, -95.4466180000000008 29.7076300000000018, -95.4474179999999990 29.7100299999999997, -95.4479180000000014 29.7272749999999988))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "distapp.censuszipcode",
|
||||
"fields": {
|
||||
"name": "77025",
|
||||
"poly": "SRID=4269;POLYGON ((-95.4183170000000018 29.7062300000000015, -95.4147169999999960 29.7061290000000007, -95.4146170000000069 29.7053300000000000, -95.4182169999999985 29.7053300000000000, -95.4198169999999948 29.6953299999999984, -95.4194839999999971 29.6941960000000016, -95.4171659999999946 29.6909010000000002, -95.4145170000000036 29.6943300000000008, -95.4133170000000064 29.6926300000000012, -95.4126169999999973 29.6897300000000008, -95.4128170000000040 29.6875299999999989, -95.4140869999999950 29.6850549999999984, -95.4191650000000067 29.6854280000000017, -95.4216169999999977 29.6851300000000009, -95.4257170000000059 29.6798299999999990, -95.4250169999999969 29.6792300000000004, -95.4245169999999945 29.6776300000000006, -95.4274180000000030 29.6776300000000006, -95.4380179999999996 29.6646310000000000, -95.4367129999999975 29.6644110000000012, -95.4401179999999982 29.6622309999999985, -95.4392179999999968 29.6610310000000013, -95.4377180000000038 29.6601309999999998, -95.4357179999999943 29.6597310000000007, -95.4318180000000069 29.6603309999999993, -95.4414179999999988 29.6566310000000009, -95.4413179999999954 29.6563310000000016, -95.4418179999999978 29.6561309999999985, -95.4417179999999945 29.6590309999999988, -95.4411180000000030 29.6610310000000013, -95.4467180000000042 29.6564310000000013, -95.4465179999999975 29.6734310000000008, -95.4469179999999966 29.6901299999999999, -95.4474179999999990 29.7100299999999997, -95.4466180000000008 29.7076300000000018, -95.4450180000000046 29.7068300000000001, -95.4408179999999930 29.7059299999999986, -95.4183170000000018 29.7062300000000015))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "distapp.censuszipcode",
|
||||
"fields": {
|
||||
"name": "77401",
|
||||
"poly": "SRID=4269;POLYGON ((-95.4479180000000014 29.7272749999999988, -95.4474179999999990 29.7100299999999997, -95.4469179999999966 29.6901299999999999, -95.4543180000000007 29.6889299999999992, -95.4758190000000013 29.6890299999999989, -95.4758190000000013 29.6911300000000011, -95.4844190000000026 29.6910300000000014, -95.4845190000000059 29.6990300000000005, -95.4804189999999977 29.7013299999999987, -95.4804189999999977 29.6983299999999986, -95.4741190000000017 29.6983299999999986, -95.4741190000000017 29.7045299999999983, -95.4727189999999979 29.7128300000000003, -95.4680189999999982 29.7129300000000001, -95.4682190000000048 29.7202289999999998, -95.4640179999999958 29.7202289999999998, -95.4641179999999991 29.7245290000000004, -95.4630180000000053 29.7259290000000007, -95.4598179999999985 29.7261290000000002, -95.4599180000000018 29.7203289999999996, -95.4514180000000039 29.7204289999999993, -95.4517749999999978 29.7263030000000015, -95.4513180000000006 29.7270290000000017, -95.4479180000000014 29.7272749999999988))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.southtexaszipcode",
|
||||
"fields": {
|
||||
"name": "77002",
|
||||
"poly": "SRID=32140;POLYGON ((951429.5409192872466519 4220355.4988148519769311, 951680.8273045794339851 4220363.3144243787974119, 951827.5242763287387788 4220312.4344643373042345, 952436.4125371500849724 4220331.4033580468967557, 952733.6038219904294237 4220418.2972162021324039, 952816.4884229446761310 4219622.4721539746969938, 952816.8189755391795188 4219301.8983748322352767, 952911.1013538520783186 4219071.0846072295680642, 953168.6460092773195356 4218879.5251544509083033, 952720.5711025173077360 4218355.4412181628867984, 952315.9552874444052577 4218608.9603398498147726, 952149.8976783070247620 4218348.7396276174113154, 951948.6335086676990613 4218597.5187743240967393, 951636.5529057731619105 4218676.5191153362393379, 951581.2288653708528727 4218591.8528460673987865, 951647.5797480825567618 4218322.0148884318768978, 951983.4872268696781248 4218099.5997478468343616, 951817.4139249715954065 4217839.3842275496572256, 951728.6875000044237822 4217892.0683275610208511, 951284.8837139783427119 4217224.0225605471059680, 951107.4276299364864826 4217329.3996630022302270, 950666.1605060384608805 4217204.8158583818003535, 950087.6947283914778382 4216510.4676794996485114, 949368.1435158180538565 4215368.3503736928105354, 949304.3111934799235314 4215554.8883790764957666, 949353.7683630869723856 4215833.6369291869923472, 949819.0428102404111996 4216435.6196845080703497, 950411.6597438841126859 4216986.2362841432914138, 950781.1835370573680848 4217552.1403498277068138, 950190.1823301381664351 4217935.0160658890381455, 950184.6762747208122164 4218065.9165289513766766, 950176.4407065160339698 4218331.7956013763323426, 950427.4286870528012514 4218350.6616439744830132, 950544.5537801468744874 4218942.0070019531995058, 950636.7473976470064372 4219089.0227092057466507, 950791.4425049067940563 4219404.3132666023448110, 950736.2833876821678132 4219934.7619700236245990, 951360.7634590273955837 4219863.5588980689644814, 951350.7981466529890895 4219776.4222313342615962, 952062.5793334231711924 4219598.9663440436124802, 952068.7943994677625597 4219710.0501319468021393, 952017.3623401129152626 4219808.2495522042736411, 951911.7334559946320951 4219782.7825336037203670, 951659.2534216577187181 4219912.4288446288555861, 951406.7457121167099103 4220155.1877524554729462, 951429.5409192872466519 4220355.4988148519769311))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "distapp.southtexaszipcode",
|
||||
"fields": {
|
||||
"name": "77005",
|
||||
"poly": "SRID=32140;POLYGON ((943568.6284788220655173 4215118.1416417406871915, 945487.9980521594407037 4215337.8481928687542677, 946154.1517634749179706 4215391.4863748690113425, 946400.6304061285918579 4215243.7918130923062563, 946414.3720398070290685 4215111.1480321725830436, 947999.4599494948051870 4215181.9933486394584179, 948002.5282293657073751 4215082.2888173414394259, 948660.1417131680063903 4215102.5451732110232115, 948987.1902349996380508 4215168.0774542130529881, 949201.2831489123636857 4215130.3313774159178138, 948579.1820738224778324 4213957.9057207889854908, 948480.7719409475103021 4214010.3167602103203535, 948167.3284030471695587 4213501.6696778312325478, 947139.6595406322740018 4213869.2741038342937827, 946463.7483147600432858 4213815.2817387804389000, 946502.2630172523204237 4212874.0348161971196532, 944327.1378451543860137 4212774.3432321334257722, 943917.9093748427694663 4212861.6900106100365520, 943760.4753683793824166 4212945.6127811912447214, 943675.0267053353600204 4213209.1422286527231336, 943568.6284788220655173 4215118.1416417406871915))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "distapp.southtexaszipcode",
|
||||
"fields": {
|
||||
"name": "77025",
|
||||
"poly": "SRID=32140;POLYGON ((946502.2630172523204237 4212874.0348161971196532, 946850.7713855113834143 4212873.5172070376574993, 946863.1571223458740860 4212785.2985141929239035, 946514.9888159723486751 4212774.6266902117058635, 946394.1713412774261087 4211662.0614421153441072, 946430.2274363302858546 4211537.4205564847216010, 946665.6199423221405596 4211179.2615583632141352, 946910.2001898437738419 4211566.9887375179678202, 947032.0462735339533538 4211382.2191729480400681, 947109.6117705166107044 4211063.0284381639212370, 947097.7440171607304364 4210818.7144018746912479, 946983.3062754627317190 4210540.7604114022105932, 946490.8323894963832572 4210567.0268272040411830, 946254.6550409919582307 4210526.7516811080276966, 945876.0008902740664780 4209927.4740557167679071, 945945.7498299231519923 4209863.0751969292759895, 945999.5397084732539952 4209687.3030018107965589, 945718.8972609748598188 4209678.7238750727847219, 944737.3260139031335711 4208207.3771017007529736, 944864.3308290732093155 4208186.8525157077237964, 944542.2412279490381479 4207935.3116904916241765, 944633.3693750606616959 4207805.0250262534245849, 944781.5411592419259250 4207709.7424235185608268, 944976.4055775101296604 4207671.3274960424751043, 945351.7294723913073540 4207749.3068800456821918, 944435.3426235395018011 4207311.1031644716858864, 944446.0302430286537856 4207278.1630970388650894, 944398.3243151376955211 4207254.5342014739289880, 944398.2226623257156461 4207576.0964536992833018, 944449.5330111491493881 4207799.4275652254000306, 943923.1866919576423243 4207273.3492023386061192, 943885.2983187574427575 4209157.2369952416047454, 943790.3796654250472784 4211006.0231411391869187, 943675.0267053353600204 4213209.1422286527231336, 943760.4753683793824166 4212945.6127811912447214, 943917.9093748427694663 4212861.6900106100365520, 944327.1378451543860137 4212774.3432321334257722, 946502.2630172523204237 4212874.0348161971196532))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "distapp.southtexaszipcode",
|
||||
"fields": {
|
||||
"name": "77401",
|
||||
"poly": "SRID=32140;POLYGON ((943568.6284788220655173 4215118.1416417406871915, 943675.0267053353600204 4213209.1422286527231336, 943790.3796654250472784 4211006.0231411391869187, 943078.6190994082717225 4210851.3527729213237762, 940998.4896008004434407 4210799.5486384732648730, 940991.4769605984911323 4211032.1947893090546131, 940159.9452393862884492 4210996.0721307108178735, 940123.6234478773549199 4211882.0554536599665880, 940512.5092238665092736 4212148.7901582065969706, 940522.5142344047781080 4211816.4372764797881246, 941131.8601800086908042 4211834.7971962466835976, 941111.1461491615045816 4212521.6589920166879892, 941218.8068687882041559 4213445.2531420132145286, 941672.9982470837421715 4213470.0535286460071802, 941629.2300919098779559 4214278.0848444234579802, 942035.4691281586419791 4214290.3638116680085659, 942011.3920782012864947 4214766.4446664610877633, 942113.0660258040297776 4214924.7603673832491040, 942421.8192426580935717 4214956.2823535148054361, 942431.6055385319050401 4214313.4400705620646477, 943253.2209875346161425 4214349.4362764349207282, 943198.9497700630454347 4214999.1347201215103269, 943240.6978847808204591 4215080.9052637927234173, 943568.6284788220655173 4215118.1416417406871915))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.interstate",
|
||||
"fields": {
|
||||
"path": "SRID=4326;LINESTRING (-104.4780170766107972 36.6669879187069370, -104.4468522338494978 36.7992540939338610, -104.4621269262599981 36.9372149776075034, -104.5126119783767962 37.0816326882088703, -104.5247764602161027 37.2930049989204804, -104.7084397427667994 37.4915025992539768, -104.8126599016281943 37.6951428562186308, -104.8452887035466006 37.8761339565947921, -104.7160169341002955 38.0595176333779932, -104.6165437927668052 38.3043204585510608, -104.6437227858174026 38.5397998656473675, -104.7596170387259065 38.7322907594295032, -104.8380078676821938 38.8999846060434109, -104.8501253693505930 39.0998018921335770, -104.8791648316464062 39.2436877645750286, -104.8635041274215070 39.3785278162751027, -104.8894471170052043 39.5929228239604996, -104.9721242843343987 39.6952848241968468, -105.0112104500356054 39.7273080432393968, -105.0010368577104032 39.7667760781157114, -104.9818356189999946 39.8146650412196692, -104.9858891550477011 39.8880691125083189, -104.9873548059578070 39.9811723457101635, -104.9766220487419019 40.0979642345069180, -104.9818565932953049 40.3605653066288426, -104.9912746373996981 40.7490448444765576)",
|
||||
"name": "I-25"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "distapp.southtexasinterstate",
|
||||
"fields": {
|
||||
"path": "SRID=32140;LINESTRING (924952.5000000000000000 4220931.5999999996274710, 925065.3000000000465661 4220931.5999999996274710, 929568.4000000000232831 4221057.7999999998137355)",
|
||||
"name": "I-10"
|
||||
}
|
||||
}
|
||||
]
|
Binary file not shown.
@ -21,6 +21,7 @@ if HAS_GEOS and HAS_SPATIAL_DB:
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB and not mysql,
|
||||
"Geos and spatial db (not mysql) are required.")
|
||||
class DistanceTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
if HAS_GEOS and HAS_SPATIAL_DB:
|
||||
# A point we are testing distances with -- using a WGS84
|
||||
@ -219,7 +220,7 @@ class DistanceTest(TestCase):
|
||||
ref_zips = ['77002', '77025', '77401']
|
||||
|
||||
for buf in [buf1, buf2]:
|
||||
qs = CensusZipcode.objects.exclude(name='77005').transform(32140).distance(buf)
|
||||
qs = CensusZipcode.objects.exclude(name='77005').transform(32140).distance(buf).order_by('name')
|
||||
self.assertListEqual(ref_zips, self.get_names(qs))
|
||||
for i, z in enumerate(qs):
|
||||
self.assertAlmostEqual(z.distance.m, dists_m[i], 5)
|
||||
@ -361,7 +362,7 @@ class DistanceTest(TestCase):
|
||||
# SELECT ST_Perimeter(distapp_southtexaszipcode.poly) FROM distapp_southtexaszipcode;
|
||||
perim_m = [18404.3550889361, 15627.2108551001, 20632.5588368978, 17094.5996143697]
|
||||
tol = 2 if oracle else 7
|
||||
for i, z in enumerate(SouthTexasZipcode.objects.perimeter()):
|
||||
for i, z in enumerate(SouthTexasZipcode.objects.order_by('name').perimeter()):
|
||||
self.assertAlmostEqual(perim_m[i], z.perimeter.m, tol)
|
||||
|
||||
# Running on points; should return 0.
|
||||
|
Binary file not shown.
@ -17,6 +17,7 @@ if HAS_GEOS:
|
||||
@override_settings(ROOT_URLCONF='django.contrib.gis.tests.geoapp.urls')
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class GeoFeedTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
def setUp(self):
|
||||
Site(id=settings.SITE_ID, domain="example.com", name="example.com").save()
|
||||
|
@ -17,6 +17,7 @@ if HAS_GEOS:
|
||||
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class GeoRegressionTests(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
def test_update(self):
|
||||
"Testing GeoQuerySet.update(). See #10411."
|
||||
|
@ -30,6 +30,7 @@ def postgis_bug_version():
|
||||
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class GeoModelTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
def test_fixtures(self):
|
||||
"Testing geographic model initialization from fixtures."
|
||||
@ -206,6 +207,7 @@ class GeoModelTest(TestCase):
|
||||
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class GeoLookupTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
@no_mysql
|
||||
def test_disjoint_lookup(self):
|
||||
@ -397,6 +399,8 @@ class GeoLookupTest(TestCase):
|
||||
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class GeoQuerySetTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
# Please keep the tests in GeoQuerySet method's alphabetic order
|
||||
|
||||
@no_mysql
|
||||
|
@ -19,6 +19,7 @@ if HAS_GEOS:
|
||||
|
||||
@skipUnless(HAS_GEOS and postgis, "Geos and postgis are required.")
|
||||
class GeographyTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
def test01_fixture_load(self):
|
||||
"Ensure geography features loaded properly."
|
||||
|
139
django/contrib/gis/tests/relatedapp/fixtures/initial.json
Normal file
139
django/contrib/gis/tests/relatedapp/fixtures/initial.json
Normal file
@ -0,0 +1,139 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "relatedapp.location",
|
||||
"fields": {
|
||||
"point": "SRID=4326;POINT (-97.516111 33.058333)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "relatedapp.location",
|
||||
"fields": {
|
||||
"point": "SRID=4326;POINT (-104.528056 33.387222)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "relatedapp.location",
|
||||
"fields": {
|
||||
"point": "SRID=4326;POINT (-79.460734 40.18476)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "relatedapp.location",
|
||||
"fields": {
|
||||
"point": "SRID=4326;POINT (-95.363151 29.763374)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "relatedapp.location",
|
||||
"fields": {
|
||||
"point": "SRID=4326;POINT (-96.801611 32.782057)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Aurora",
|
||||
"state": "TX",
|
||||
"location": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Roswell",
|
||||
"state": "NM",
|
||||
"location": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Kecksburg",
|
||||
"state": "PA",
|
||||
"location": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Dallas",
|
||||
"state": "TX",
|
||||
"location": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Houston",
|
||||
"state": "TX",
|
||||
"location": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 6,
|
||||
"model": "relatedapp.city",
|
||||
"fields": {
|
||||
"name": "Fort Worth",
|
||||
"state": "TX",
|
||||
"location": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "relatedapp.Author",
|
||||
"fields": {
|
||||
"name": "Trevor Paglen",
|
||||
"dob": "1974-5-23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "relatedapp.Author",
|
||||
"fields": {
|
||||
"name": "William Patry",
|
||||
"dob": "1950-1-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "relatedapp.Book",
|
||||
"fields": {
|
||||
"title": "Torture Taxi",
|
||||
"author": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "relatedapp.Book",
|
||||
"fields": {
|
||||
"title": "I Could Tell You But Then You Would Have to be Destroyed by Me",
|
||||
"author": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "relatedapp.Book",
|
||||
"fields": {
|
||||
"title": "Blank Spots on the Map",
|
||||
"author": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "relatedapp.Book",
|
||||
"fields": {
|
||||
"title": "Patry on Copyright",
|
||||
"author": 2
|
||||
}
|
||||
}
|
||||
]
|
Binary file not shown.
@ -16,6 +16,7 @@ if HAS_GEOS:
|
||||
|
||||
@skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.")
|
||||
class RelatedGeoModelTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
def test02_select_related(self):
|
||||
"Testing `select_related` on geographic models (see #7126)."
|
||||
@ -284,7 +285,7 @@ class RelatedGeoModelTest(TestCase):
|
||||
# Even though Dallas and Ft. Worth share same point, Collect doesn't
|
||||
# consolidate -- that's why 4 points in MultiPoint.
|
||||
self.assertEqual(4, len(coll))
|
||||
self.assertEqual(ref_geom, coll)
|
||||
self.assertTrue(ref_geom.equals(coll))
|
||||
|
||||
def test15_invalid_select_related(self):
|
||||
"Testing doing select_related on the related name manager of a unique FK. See #13934."
|
||||
|
1
tests/fixtures/tests.py
vendored
1
tests/fixtures/tests.py
vendored
@ -69,6 +69,7 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase):
|
||||
|
||||
def test_initial_data(self):
|
||||
# migrate introduces 1 initial data object from initial_data.json.
|
||||
# this behavior is deprecated and will be removed in Django 1.9
|
||||
self.assertQuerysetEqual(Book.objects.all(), [
|
||||
'<Book: Achieving self-awareness of Python programs>'
|
||||
])
|
||||
|
@ -67,6 +67,7 @@ class FixtureTestCase(TestCase):
|
||||
def test_initial_data(self):
|
||||
"Fixtures can load initial data into models defined in packages"
|
||||
# migrate introduces 1 initial data object from initial_data.json
|
||||
# this behavior is deprecated and will be removed in Django 1.9
|
||||
self.assertQuerysetEqual(
|
||||
Book.objects.all(), [
|
||||
'Achieving self-awareness of Python programs'
|
||||
|
@ -221,6 +221,11 @@ def django_tests(verbosity, interactive, failfast, test_labels):
|
||||
"use '<app_label>/sql' instead.",
|
||||
RemovedInDjango19Warning
|
||||
)
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
'initial_data fixtures are deprecated. Use data migrations instead.',
|
||||
RemovedInDjango19Warning
|
||||
)
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
'IPAddressField has been deprecated. Use GenericIPAddressField instead.',
|
||||
|
Loading…
Reference in New Issue
Block a user