Index: sitescripts/extensions/test/test_createNightlies.py |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/sitescripts/extensions/test/test_createNightlies.py |
@@ -0,0 +1,37 @@ |
+# This file is part of the Adblock Plus web scripts, |
+# Copyright (C) 2006-2016 Eyeo GmbH |
+# |
+# Adblock Plus is free software: you can redistribute it and/or modify |
+# it under the terms of the GNU General Public License version 3 as |
+# published by the Free Software Foundation. |
+# |
+# Adblock Plus is distributed in the hope that it will be useful, |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+# GNU General Public License for more details. |
+# |
+# You should have received a copy of the GNU General Public License |
+# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
+ |
+"""Tests for create nightlies script.""" |
+import pytest |
+ |
+from sitescripts.extensions.bin import createNightlies |
+from sitescripts.utils import get_config |
+ |
+ |
+@pytest.fixture() |
+def config(hg_dir): |
+ config = get_config() |
+ config.type = 'safari' |
+ config.repository = str(hg_dir.join('adblockplusnightly')) |
+ return config |
+ |
+ |
+@pytest.fixture() |
+def nightlybuild(config): |
+ return createNightlies.NightlyBuild(config) |
+ |
+ |
+def test_nightly_object_bookmark(nightlybuild): |
+ assert nightlybuild.bookmark == 'safari' |