Example #1
0
def test_downloads_format_quadrillion(
        downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(11_132_919_492_432_000)
    assert "11P" == downloads_formatter.format(downloads)
Example #2
0
def test_downloads_format_billion(
        downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(9_132_919_492)
    assert "9G" == downloads_formatter.format(downloads)
Example #3
0
def test_downloads_format_million(
        downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(412_132_492)
    assert "412M" == downloads_formatter.format(downloads)
Example #4
0
def test_downloads_format_thousands(
        downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(12132)
    assert "12k" == downloads_formatter.format(downloads)
Example #5
0
def test_downloads_format_less_than_thousands(
        downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(121)
    assert "121" == downloads_formatter.format(downloads)
Example #6
0
def test_downloads_format_0(downloads_formatter: DownloadsNumberFormatter):
    downloads = Downloads(0)
    assert "0" == downloads_formatter.format(downloads)