Beispiel #1
0
 def test_one_record_state(self):
     self.assertEqual(len(self.exporter.states_dict), 1)
     state = self.exporter.states_dict[self.desired_user.dn]
     self.assertEqual(state,
                      RecordState(current=None, desired=self.desired_user))
Beispiel #2
0
 def test_equality_current_and_desired(self):
     self.assertEqual(RecordState(current=self.record, desired=self.record),
                      RecordState(current=self.record, desired=self.record))
Beispiel #3
0
 def test_not_equal_to_none(self):
     self.assertNotEqual(RecordState(), RecordState(current=self.record))
Beispiel #4
0
 def test_equality_only_current(self):
     self.assertEqual(RecordState(current=self.record),
                      RecordState(current=self.record))
Beispiel #5
0
 def test_equality_only_desired(self):
     self.assertEqual(RecordState(desired=self.record),
                      RecordState(desired=self.record))
Beispiel #6
0
 def test_not_equal_to_none(self, record):
     assert RecordState() != RecordState(current=record)
Beispiel #7
0
 def test_equality_both_none(self):
     self.assertEqual(RecordState(), RecordState())
Beispiel #8
0
 def test_equality_current_and_desired(self, record):
     assert RecordState(current=record, desired=record) \
         == RecordState(current=record, desired=record)
Beispiel #9
0
 def test_equality_only_desired(self, record):
     assert RecordState(desired=record) == RecordState(desired=record)
Beispiel #10
0
 def test_equality_only_current(self, record):
     assert RecordState(current=record) == RecordState(current=record)
Beispiel #11
0
 def test_equality_both_none(self):
     assert RecordState() == RecordState()
Beispiel #12
0
 def test_one_record_state(self, exporter, desired_user):
     assert len(exporter.states_dict) == 1
     state = exporter.states_dict[desired_user.dn]
     assert state == RecordState(current=None, desired=desired_user)