Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/tests/test_kafka_writer.py
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | for key, obj_dict in consumed_messages["revision"]: | ||||
for person in (obj.author, obj.committer): | for person in (obj.author, obj.committer): | ||||
assert not ( | assert not ( | ||||
len(person.fullname) == 32 | len(person.fullname) == 32 | ||||
and person.name is None | and person.name is None | ||||
and person.email is None | and person.email is None | ||||
) | ) | ||||
for key, obj_dict in consumed_messages["release"]: | for key, obj_dict in consumed_messages["release"]: | ||||
obj = Release.from_dict(obj_dict) | obj = Release.from_dict(obj_dict) | ||||
# author is optional for release | |||||
if obj.author is None: | |||||
continue | |||||
for person in (obj.author,): | for person in (obj.author,): | ||||
assert not ( | assert not ( | ||||
len(person.fullname) == 32 | len(person.fullname) == 32 | ||||
and person.name is None | and person.name is None | ||||
and person.email is None | and person.email is None | ||||
) | ) | ||||
Show All 27 Lines | for key, obj_dict in consumed_messages["revision"]: | ||||
for person in (obj.author, obj.committer): | for person in (obj.author, obj.committer): | ||||
assert ( | assert ( | ||||
len(person.fullname) == 32 | len(person.fullname) == 32 | ||||
and person.name is None | and person.name is None | ||||
and person.email is None | and person.email is None | ||||
) | ) | ||||
for key, obj_dict in consumed_messages["release"]: | for key, obj_dict in consumed_messages["release"]: | ||||
obj = Release.from_dict(obj_dict) | obj = Release.from_dict(obj_dict) | ||||
# author is optional for release | |||||
if obj.author is None: | |||||
continue | |||||
for person in (obj.author,): | for person in (obj.author,): | ||||
assert ( | assert ( | ||||
len(person.fullname) == 32 | len(person.fullname) == 32 | ||||
and person.name is None | and person.name is None | ||||
and person.email is None | and person.email is None | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |