File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v1.1.2 - 2022-05-09
4+
5+ ### Fixed
6+
7+ - [ #48 ] ( https://github.com/nautobot/nautobot-plugin-ssot/pull/48 ) - Fix introduced bug in #43 , using a nonexistent method in an object.
8+
39## v1.1.1 - 2022-05-06
410
511### Added
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def calculate_diff(self):
8080 self .diff = self .source_adapter .diff_to (self .target_adapter , flags = self .diffsync_flags )
8181 self .sync .diff = self .diff .dict ()
8282 self .sync .save ()
83- self .log_info (message = self .sync . diff .summary ())
83+ self .log_info (message = self .diff .summary ())
8484 else :
8585 self .log_warning (message = "Not both adapters were properly initialized prior to diff calculation." )
8686
Original file line number Diff line number Diff line change 11"""Test the Job classes in nautobot_ssot."""
2+ from unittest .mock import Mock
23import uuid
34from django .contrib .contenttypes .models import ContentType
45
@@ -89,6 +90,16 @@ def test_run(self):
8990 self .assertTrue (self .job .sync .dry_run )
9091 self .assertEqual (self .job .job_result , self .job .sync .job_result )
9192
93+ def test_calculate_diff (self ):
94+ """Test calculate_diff() method."""
95+ self .job .sync = Mock ()
96+ self .job .source_adapter = Mock ()
97+ self .job .target_adapter = Mock ()
98+ self .job .source_adapter .diff_to ().dict .return_value = {}
99+ self .job .calculate_diff ()
100+ self .job .source_adapter .diff_to .assert_called ()
101+ self .job .sync .save .assert_called_once ()
102+
92103
93104class DataSourceTestCase (BaseJobTestCase ):
94105 """Test the DataSource class."""
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " nautobot-ssot"
3- version = " 1.1.1 "
3+ version = " 1.1.2 "
44description = " Nautobot Single Source of Truth"
55authors = [" Network to Code, LLC <opensource@networktocode.com>" ]
66license = " Apache-2.0"
You can’t perform that action at this time.
0 commit comments