diff --git a/gratipay/models/package/__init__.py b/gratipay/models/package/__init__.py index 64eda95ba7..24af56d724 100644 --- a/gratipay/models/package/__init__.py +++ b/gratipay/models/package/__init__.py @@ -4,6 +4,10 @@ from postgres.orm import Model +NPM = 'npm' # We are starting with a single package manager. If we see + # traction we will expand. + + class Package(Model): """Represent a gratipackage. :-) """ diff --git a/tests/py/test_packages.py b/tests/py/test_packages.py index a479070c8b..b97e888377 100644 --- a/tests/py/test_packages.py +++ b/tests/py/test_packages.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals -from gratipay.models.package import Package +from gratipay.models.package import NPM, Package from gratipay.testing import Harness @@ -13,4 +13,4 @@ def test_can_be_instantiated_from_id(self): def test_can_be_instantiated_from_names(self): self.make_package() - assert Package.from_names('npm', 'foo').name == 'foo' + assert Package.from_names(NPM, 'foo').name == 'foo'