                                      (:output t :occur 1)
                                      (:output nil :occur 1)))
                  (configuration-layer/layer-usedp (l) ((:output t :occur 2))))
-                (should (equal '([object cfgl-package "pkg1" pkg1 layer3 (layer6) (layer6) elpa nil nil])
+                (should (equal (list (cfgl-package "pkg1" :name 'pkg1 :owner 'layer3 :pre-layers '(layer6) :post-layers '(layer6)))
                                (configuration-layer/get-packages layers))))))
 
 (ert-deftest test-get-packages--several-init-functions-last-one-is-the-owner ()

    (mocker-let ((file-exists-p (f) ((:output t :occur 1)
                                     (:output nil :occur 1)))
                 (configuration-layer/layer-usedp (l) ((:output t :occur 1))))
                (should (equal '([object cfgl-package "pkg4" pkg4 layer1 nil nil elpa nil nil]
                                 [object cfgl-package "pkg3" pkg3 layer1 nil nil local pre nil]
                                 [object cfgl-package "pkg2" pkg2 layer1 nil nil recipe nil nil]
                                 [object cfgl-package "pkg1" pkg1 layer1 nil nil elpa nil nil])
                               (configuration-layer/get-packages layers))))))

(ert-deftest test-get-packages--pkg2-has-no-owner-because-no-init-function ()

    (mocker-let ((file-exists-p (f) ((:output t :occur 1)
                                     (:output nil :occur 1)))
                 (configuration-layer/layer-usedp (l) ((:output t :occur 1))))
                (should (equal (list (cfgl-package "pkg3" :name 'pkg3 :owner 'layer11)
                                     (cfgl-package "pkg2" :name 'pkg2 :owner 'layer11 :excluded t)
                                     (cfgl-package "pkg1" :name 'pkg1 :owner 'layer11))
                               (configuration-layer/get-packages layers t))))))

(ert-deftest test-get-packages--dotfile-declares-and-owns-one-additional-package ()
