Skip to content

Commit da6a708

Browse files
authored
Merge pull request #49 from chadell/release-v1.1.2
Release v1.1.2
2 parents 0439603 + 06cbc55 commit da6a708

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
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

nautobot_ssot/jobs/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

nautobot_ssot/tests/test_jobs.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test the Job classes in nautobot_ssot."""
2+
from unittest.mock import Mock
23
import uuid
34
from 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

93104
class DataSourceTestCase(BaseJobTestCase):
94105
"""Test the DataSource class."""

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "nautobot-ssot"
3-
version = "1.1.1"
3+
version = "1.1.2"
44
description = "Nautobot Single Source of Truth"
55
authors = ["Network to Code, LLC <opensource@networktocode.com>"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)