File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ def all_components(request): # requested on_load() for querying
26
26
})
27
27
28
28
def top_components (request ):
29
- top_components = TopComponentSerializer (Component .objects .all ().order_by ('-downloads' )[:10 ], many = True )
29
+ # Download data is from Github and hence stars are used
30
+ top_components = TopComponentSerializer (Component .objects .all ().order_by ('-stars' )[:10 ], many = True )
30
31
return JsonResponse ({
31
32
'top_components' :top_components .data ,
32
33
})
Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ def test_relevance_of_response(self):
277
277
'license' in object
278
278
)
279
279
# check if number of commits >= 50, from the time the tests were initiated
280
+ ### As number of stars, watchers might go down in the future so they haven't been tested
280
281
self .assertTrue (int (response .json ()['details' ]['commits' ]) >= 50 )
281
282
282
283
# modified date should be after created date
You can’t perform that action at this time.
0 commit comments