Skip to content

Commit

Permalink
[ci] Force reinstall swapper
Browse files Browse the repository at this point in the history
  • Loading branch information
codesankalp committed Nov 28, 2021
1 parent 6f31ba4 commit 5926a7d
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
run: |
pip install -U "pip==20.2.4" wheel setuptools
pip install ${{ matrix.django-version }}
pip install swapper@git+git://github.com/openwisp/django-swappable-models.git@master
pip install -U -r requirements-test.txt
- name: Install npm dependencies
Expand Down
70 changes: 69 additions & 1 deletion tests/openwisp2/sample_users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.1.8 on 2021-11-27 14:26
# Generated by Django 3.1.8 on 2021-11-27 15:27

import uuid

Expand Down Expand Up @@ -405,4 +405,72 @@ class Migration(migrations.Migration):
},
bases=(organizations.base.UnicodeMixin, models.Model),
),
migrations.CreateModel(
name='OrganizationInvitation',
fields=[
(
'id',
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name='ID',
),
),
('guid', models.UUIDField(editable=False)),
(
'invitee_identifier',
models.CharField(
help_text=(
'The contact identifier for the invitee, email,'
' phone number, social media handle, etc.'
),
max_length=1000,
),
),
(
'created',
organizations.fields.AutoCreatedField(
default=django.utils.timezone.now, editable=False
),
),
(
'modified',
organizations.fields.AutoLastModifiedField(
default=django.utils.timezone.now, editable=False
),
),
(
'invited_by',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name=(
'sample_users_organizationinvitation_sent_invitations'
),
to=settings.AUTH_USER_MODEL,
),
),
(
'invitee',
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name='sample_users_organizationinvitation_invitations',
to=settings.AUTH_USER_MODEL,
),
),
(
'organization',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='organization_invites',
to='sample_users.organization',
),
),
],
options={
'abstract': False,
},
),
]
5 changes: 5 additions & 0 deletions tests/openwisp2/sample_users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.db import models
from organizations.abstract import (
AbstractOrganization,
AbstractOrganizationInvitation,
AbstractOrganizationOwner,
AbstractOrganizationUser,
)
Expand Down Expand Up @@ -43,6 +44,10 @@ class Meta(AbstractOrganizationOwner.Meta):
abstract = False


class OrganizationInvitation(AbstractOrganizationInvitation):
pass


class Group(BaseGroup, AbstractGroup):
class Meta(BaseGroup.Meta):
abstract = False
1 change: 1 addition & 0 deletions tests/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
OPENWISP_USERS_ORGANIZATION_MODEL = 'sample_users.Organization'
OPENWISP_USERS_ORGANIZATIONUSER_MODEL = 'sample_users.OrganizationUser'
OPENWISP_USERS_ORGANIZATIONOWNER_MODEL = 'sample_users.OrganizationOwner'
OPENWISP_USERS_ORGANIZATIONINVITATION_MODEL = 'sample_users.OrganizationInvitation'
OPENWISP_RADIUS_RADIUSREPLY_MODEL = 'sample_radius.RadiusReply'
OPENWISP_RADIUS_RADIUSGROUPREPLY_MODEL = 'sample_radius.RadiusGroupReply'
OPENWISP_RADIUS_RADIUSCHECK_MODEL = 'sample_radius.RadiusCheck'
Expand Down

0 comments on commit 5926a7d

Please sign in to comment.