Skip to content

Commit

Permalink
Merge pull request #15 from techman83/defaults_test
Browse files Browse the repository at this point in the history
Defaults Test
  • Loading branch information
techman83 authored May 5, 2021
2 parents 29a838f + e1cafe0 commit 66bc142
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/hx711.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest

from filament_scale_enhanced.hx711 import HX711
from filament_scale_enhanced import FilamentScalePlugin


class TestHx711(unittest.TestCase):
Expand All @@ -11,3 +12,17 @@ def test_bool_list(self):
HX711.createBoolList(4),
bool_list
)


class TestFilamentScalePlugin(unittest.TestCase):

def test_settings_dict_defaults(self):
defaults = {
'tare': 8430152,
'reference_unit': -411,
'spool_weight': 200,
'clockpin': 21,
'datapin': 20,
'lastknownweight': 0
}
self.assertDictEqual(FilamentScalePlugin.get_settings_defaults(), defaults)

0 comments on commit 66bc142

Please sign in to comment.