udata 9.1.4.dev30983__py2.py3-none-any.whl → 9.1.4.dev31058__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of udata might be problematic. Click here for more details.

@@ -200,7 +200,7 @@ def import_fixtures(source):
200
200
  for dataservice in fixture["dataservices"]:
201
201
  dataservice = remove_unwanted_keys(dataservice, "dataservice")
202
202
  if not dataservice["contact_point"]:
203
- DataserviceFactory(**dataservice, datasets=[dataset])
203
+ DataserviceFactory(**dataservice, datasets=[dataset], organization=org)
204
204
  else:
205
205
  contact_point = ContactPoint.objects(
206
206
  id=dataservice["contact_point"]["id"]
@@ -209,5 +209,8 @@ def import_fixtures(source):
209
209
  contact_point = ContactPointFactory(**dataservice["contact_point"])
210
210
  dataservice.pop("contact_point")
211
211
  DataserviceFactory(
212
- **dataservice, datasets=[dataset], contact_point=contact_point
212
+ **dataservice,
213
+ datasets=[dataset],
214
+ organization=org,
215
+ contact_point=contact_point,
213
216
  )
@@ -51,6 +51,21 @@ class FixturesTest:
51
51
  fixtures_fd.flush()
52
52
  assert "Fixtures saved to file " in result.output
53
53
 
54
+ # Delete everything, so we can make sure the objects are imported.
55
+ models.Organization.drop_collection()
56
+ models.Dataset.drop_collection()
57
+ models.Discussion.drop_collection()
58
+ models.CommunityResource.drop_collection()
59
+ models.User.drop_collection()
60
+ models.Dataservice.drop_collection()
61
+
62
+ assert models.Organization.objects(slug=org.slug).count() == 0
63
+ assert models.Dataset.objects.count() == 0
64
+ assert models.Discussion.objects.count() == 0
65
+ assert models.CommunityResource.objects.count() == 0
66
+ assert models.User.objects.count() == 0
67
+ assert models.Dataservice.objects.count() == 0
68
+
54
69
  # Then load them in the database to make sure they're correct.
55
70
  result = cli("import-fixtures", fixtures_fd.name)
56
71
  assert models.Organization.objects(slug=org.slug).count() > 0
@@ -59,6 +74,8 @@ class FixturesTest:
59
74
  assert models.CommunityResource.objects.count() > 0
60
75
  assert models.User.objects.count() > 0
61
76
  assert models.Dataservice.objects.count() > 0
77
+ # Make sure we also import the dataservice organization
78
+ assert models.Dataservice.objects(organization__exists=True).count() > 0
62
79
 
63
80
  def test_import_fixtures_from_default_file(self, cli):
64
81
  """Test importing fixtures from udata.commands.fixture.DEFAULT_FIXTURE_FILE."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: udata
3
- Version: 9.1.4.dev30983
3
+ Version: 9.1.4.dev31058
4
4
  Summary: Open data portal
5
5
  Home-page: https://github.com/opendatateam/udata
6
6
  Author: Opendata Team
@@ -141,6 +141,7 @@ It is collectively taken care of by members of the
141
141
  ## Current (in progress)
142
142
 
143
143
  - Fix many linting issues reported by ruff [#3118](https://github.com/opendatateam/udata/pull/3118)
144
+ - Import the dataservice's organization from the fixtures [#3121](https://github.com/opendatateam/udata/pull/3121)
144
145
 
145
146
  ## 9.1.3 (2024-08-01)
146
147
 
@@ -42,7 +42,7 @@ udata/commands/__init__.py,sha256=Won_rW_hIU9TA3o4oNe6kI46l1fnDBM_oW0Hc1XS9F8,77
42
42
  udata/commands/cache.py,sha256=bLdrf_fCWFYX9ULlL2ADsZRwijkI4pArsJxfx24OivM,341
43
43
  udata/commands/db.py,sha256=x5ui77hoT-JcECneBhhXZtpH4g65gaj7SyeM0bnORhA,14694
44
44
  udata/commands/dcat.py,sha256=L1J1AxQCmMDmwdxzugQNfy4VZQYf1rI1wPhSdUaMB5E,3419
45
- udata/commands/fixtures.py,sha256=vjfa7aK4RgCUrobvjdYkDdD4ZrmgEq0uut8bdi2rPYc,8314
45
+ udata/commands/fixtures.py,sha256=FPJhABW1UFx_vLqnklZHJFY6GtFtv8BIaqK9zDXKsKY,8423
46
46
  udata/commands/images.py,sha256=0rVojLik5DYgJ6W4uNEfMP2g2QUU2V761tj3z6lo8no,2050
47
47
  udata/commands/info.py,sha256=A5WMo3_N_rlt3cySVJrZqKWrbIowX97ZLKMIFQE5178,1545
48
48
  udata/commands/init.py,sha256=8CpH8MklzPkpxczs43lFM5ZNrHCJRbUtzHapgYNHs7M,1520
@@ -52,7 +52,7 @@ udata/commands/static.py,sha256=OUYPAR1giaPk52DK-v-nQYUSx-YQ4cF7YXLt1t5wtBU,2199
52
52
  udata/commands/test.py,sha256=0snHTDolowQK-DmAKnhF_mBuDOBMApAbEc35GEiwH0M,893
53
53
  udata/commands/worker.py,sha256=bjXQGCwkbZxkcxLMPA2Lr0nkNjXLpGNDMkkQXjwBLPI,3976
54
54
  udata/commands/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- udata/commands/tests/test_fixtures.py,sha256=RibGEIEfeDkUIuw_hDL2s6HJ2kpvrpsREdlyY_ZRUm8,3241
55
+ udata/commands/tests/test_fixtures.py,sha256=kFwqWA3Ha0mnCR5EE5aPz6jv3hfPheuwOMYkOvvBKyU,4120
56
56
  udata/core/__init__.py,sha256=O7C9WWCXiLWnWPnPbFRszWhOmvRQiI4gD-5qkWvPGRo,385
57
57
  udata/core/owned.py,sha256=xcIg9fNndowuLs7BEkuxAsEdf6JApomU_Gl6L-SgTJI,4515
58
58
  udata/core/activity/__init__.py,sha256=OaiFyq7HB4xL4SuMPD1N8IFNpntwx9ZayVzelciOieI,298
@@ -697,9 +697,9 @@ udata/translations/pt/LC_MESSAGES/udata.mo,sha256=WpPzAqVd2Onv_kz45ULUySKPLrpjcc
697
697
  udata/translations/pt/LC_MESSAGES/udata.po,sha256=18Op9RUITewoDRewlOdYzzq6gjsf1lsvepACV1d7zxs,44976
698
698
  udata/translations/sr/LC_MESSAGES/udata.mo,sha256=NIYRNhVoETZUvIvWm3cCW7DtMBAnS2vXzZjMF5ZzD_c,28500
699
699
  udata/translations/sr/LC_MESSAGES/udata.po,sha256=rQB-4V4WJ7bURj6g2j653vItr5TMHadcLQxec7_fDmg,51545
700
- udata-9.1.4.dev30983.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
701
- udata-9.1.4.dev30983.dist-info/METADATA,sha256=99ViYDU6RrkTQpGiSfSYEhiNLJiJuZbMRnzT7hKLD9w,128480
702
- udata-9.1.4.dev30983.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
703
- udata-9.1.4.dev30983.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
704
- udata-9.1.4.dev30983.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
705
- udata-9.1.4.dev30983.dist-info/RECORD,,
700
+ udata-9.1.4.dev31058.dist-info/LICENSE,sha256=V8j_M8nAz8PvAOZQocyRDX7keai8UJ9skgmnwqETmdY,34520
701
+ udata-9.1.4.dev31058.dist-info/METADATA,sha256=6dDsUziqmw9VvrmWsC39jXs747RDKVcVlquw2FPxQDg,128595
702
+ udata-9.1.4.dev31058.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
703
+ udata-9.1.4.dev31058.dist-info/entry_points.txt,sha256=3SKiqVy4HUqxf6iWspgMqH8d88Htk6KoLbG1BU-UddQ,451
704
+ udata-9.1.4.dev31058.dist-info/top_level.txt,sha256=39OCg-VWFWOq4gCKnjKNu-s3OwFlZIu_dVH8Gl6ndHw,12
705
+ udata-9.1.4.dev31058.dist-info/RECORD,,