Add tests for mb abbrev util fun

This commit is contained in:
Nick Mowen 2022-07-09 08:48:35 -06:00
parent 00a72e37dc
commit 60ec0d9e58

12
frigate/test/test_util.py Normal file
View File

@ -0,0 +1,12 @@
from unittest import TestCase
from frigate.util import get_mb_from_abbrev
class TestUtils(TestCase):
def setUp(self):
self.gb127 = "127G"
self.mb228 = "228M"
def test_mb_abbrev(self):
assert get_mb_from_abbrev(self.gb127) == 127000
assert get_mb_from_abbrev(self.mb228) == 228