                                      (:output t :occur 1)
                                      (:output nil :occur 1)))
                  (configuration-layer/layer-usedp (l) ((:output t :occur 2))))
-                (should (equal '([object cfgl-package "pkg1" pkg1 layer8 nil nil elpa nil nil])
+                (should (equal (list (cfgl-package "pkg1" :name 'pkg1 :owner 'layer8))
                                (configuration-layer/get-packages layers))))))
 
 (ert-deftest test-get-packages--layer-10-excludes-pkg2-in-layer-9 ()

                                     (: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 nil (layer5) elpa nil nil])
                               (configuration-layer/get-packages layers))))))

(ert-deftest test-get-packages--pre-and-post-init-functions ()

    (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 'layer1 :location 'local :step 'pre)
                                     (cfgl-package "pkg2" :name 'pkg2 :owner 'layer1 :location 'recipe)
                                     (cfgl-package "pkg1" :name 'pkg1 :owner 'layer1 :excluded t))
                               (configuration-layer/get-packages layers))))))

(ert-deftest test-get-packages--symbols-and-lists ()
  (let* ((layer1 (cfgl-layer "layer1" :name 'layer1 :dir "/path"))
         (layers (list layer1))
         (layer1-packages '(pkg1
                            (pkg2 :location recipe)
                            (pkg3 :location local :step pre)
                            pkg4))
         (mocker-mock-default-record-cls 'mocker-stub-record))
    (defun layer1/init-pkg1 nil)
    (defun layer1/init-pkg2 nil)
