mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 20:51:55 +02:00
Added stats endpoint for domain
This commit is contained in:
parent
be388870a3
commit
032197da3f
5 changed files with 71 additions and 1 deletions
|
@ -77,3 +77,23 @@ def test_external_domains(factories, settings):
|
|||
settings.FEDERATION_HOSTNAME = d1.pk
|
||||
|
||||
assert list(models.Domain.objects.external()) == [d2]
|
||||
|
||||
|
||||
def test_domain_stats(factories):
|
||||
expected = {
|
||||
"actors": 0,
|
||||
"libraries": 0,
|
||||
"tracks": 0,
|
||||
"albums": 0,
|
||||
"uploads": 0,
|
||||
"artists": 0,
|
||||
"outbox_activities": 0,
|
||||
"received_library_follows": 0,
|
||||
"emitted_library_follows": 0,
|
||||
"media_total_size": 0,
|
||||
"media_downloaded_size": 0,
|
||||
}
|
||||
|
||||
domain = factories["federation.Domain"]()
|
||||
|
||||
assert domain.get_stats() == expected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue