misc: enable pylint for tests, fix warnings (#83980)
gitea/lingo/pipeline/head This commit looks good
Details
gitea/lingo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
919b43df4f
commit
71d23268da
|
@ -163,8 +163,8 @@ def test_refresh_agendas(mock_collect):
|
|||
agenda1.category_slug = 'foo'
|
||||
agenda1.save()
|
||||
agenda2.label = 'Wrong'
|
||||
agenda2.category_label is None
|
||||
agenda2.category_slug is None
|
||||
agenda2.category_label = None
|
||||
agenda2.category_slug = None
|
||||
agenda2.save()
|
||||
refresh_agendas()
|
||||
assert Agenda.objects.count() == 2
|
||||
|
|
|
@ -10,9 +10,9 @@ pytestmark = pytest.mark.django_db
|
|||
|
||||
def test_statistics_list(app, user):
|
||||
regie = Regie.objects.create(label='Regie 1')
|
||||
agenda = Agenda.objects.create(label='Activity 1', regie=regie)
|
||||
Agenda.objects.create(label='Activity 1', regie=regie)
|
||||
|
||||
regie2 = Regie.objects.create(label='Regie 2')
|
||||
Regie.objects.create(label='Regie 2')
|
||||
|
||||
# unauthorized
|
||||
app.get('/api/statistics/', status=403)
|
||||
|
|
|
@ -1209,21 +1209,20 @@ def test_get_pricing_data(context):
|
|||
},
|
||||
)
|
||||
agenda_pricing.agendas.add(agenda)
|
||||
for subscription in [None, {'foo': 'bar'}]:
|
||||
assert agenda_pricing.get_pricing_data(
|
||||
request=context['request'],
|
||||
pricing_date=datetime.date(year=2021, month=9, day=1),
|
||||
user_external_id='child:42',
|
||||
payer_external_id='parent:35',
|
||||
) == {
|
||||
assert agenda_pricing.get_pricing_data(
|
||||
request=context['request'],
|
||||
pricing_date=datetime.date(year=2021, month=9, day=1),
|
||||
user_external_id='child:42',
|
||||
payer_external_id='parent:35',
|
||||
) == {
|
||||
'pricing': 42,
|
||||
'calculation_details': {
|
||||
'pricing': 42,
|
||||
'calculation_details': {
|
||||
'pricing': 42,
|
||||
'criterias': {'foo': 'bar'},
|
||||
'reduction_rate': {},
|
||||
'context': {'domicile': 'commune', 'qf': '2'},
|
||||
},
|
||||
}
|
||||
'criterias': {'foo': 'bar'},
|
||||
'reduction_rate': {},
|
||||
'context': {'domicile': 'commune', 'qf': '2'},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def test_get_pricing_data_for_event(context):
|
||||
|
|
Loading…
Reference in New Issue