def test_reset(self):
     scopes = [
         mock.Mock(resource_name='period', json={
             'id': i,
             'scenario': 1
         }) for i in range(5)
     ]
     manager = ScopeManager(*scopes)
     self.assertEqual(manager.count(), 5)
     manager.reset()
     self.assertEqual(manager.count(), 0)
    def test_remove(self):
        scopes = [
            mock.Mock(resource_name='period', json={
                'id': i,
                'scenario': 1
            }) for i in range(5)
        ]
        manager = ScopeManager(*scopes)
        self.assertEqual(manager.count(), 5)

        scope = scopes[1]
        manager.remove(scope)
        self.assertEqual(manager.count(), 4)
        self.assertFalse(scope in manager)