mirror of https://github.com/zulip/zulip.git
import_util: Remove uuid and uuid_owner_secret from realm dict.
This commit is contained in:
parent
73cc680289
commit
ff81e6bf32
|
@ -87,6 +87,10 @@ def build_zerver_realm(
|
||||||
)
|
)
|
||||||
realm_dict = model_to_dict(realm)
|
realm_dict = model_to_dict(realm)
|
||||||
realm_dict["date_created"] = time
|
realm_dict["date_created"] = time
|
||||||
|
# These fields are supposed to be generated upon import.
|
||||||
|
del realm_dict["uuid"]
|
||||||
|
del realm_dict["uuid_owner_secret"]
|
||||||
|
|
||||||
return [realm_dict]
|
return [realm_dict]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,8 @@ class SlackImporter(ZulipTestCase):
|
||||||
self.assertEqual(test_zerver_realm_dict["string_id"], realm_subdomain)
|
self.assertEqual(test_zerver_realm_dict["string_id"], realm_subdomain)
|
||||||
self.assertEqual(test_zerver_realm_dict["name"], realm_subdomain)
|
self.assertEqual(test_zerver_realm_dict["name"], realm_subdomain)
|
||||||
self.assertEqual(test_zerver_realm_dict["date_created"], time)
|
self.assertEqual(test_zerver_realm_dict["date_created"], time)
|
||||||
|
self.assertNotIn("uuid", test_zerver_realm_dict)
|
||||||
|
self.assertNotIn("uuid_owner_secret", test_zerver_realm_dict)
|
||||||
|
|
||||||
@responses.activate
|
@responses.activate
|
||||||
def test_check_token_access(self) -> None:
|
def test_check_token_access(self) -> None:
|
||||||
|
|
Loading…
Reference in New Issue