def test__total_recent(self) -> None: # Arrange data = copy.deepcopy(SAMPLE_DATA_RECENT) # Act output = pypistats._total(data) # Assert assert output == SAMPLE_DATA_RECENT
def test__total_recent(self): # Arrange data = copy.deepcopy(SAMPLE_DATA_RECENT) # Act output = pypistats._total(data) # Assert self.assertEqual(output, SAMPLE_DATA_RECENT)
def test__total(self) -> None: # Arrange data = copy.deepcopy(PYTHON_MINOR_DATA) # Act output = pypistats._total(data) # Assert assert len(output) == 12 assert output[0]["category"] == "2.4" assert output[0]["downloads"] == 9
def test__total(self): # Arrange data = copy.deepcopy(PYTHON_MINOR_DATA) # Act output = pypistats._total(data) # Assert self.assertEqual(len(output), 12) self.assertEqual(output[0]["category"], "2.4") self.assertEqual(output[0]["downloads"], 9)